Skip to content

Commit

Permalink
Merge pull request #4 from smallcase/feat/network-array
Browse files Browse the repository at this point in the history
fix: made ami mandatory, reconfigured timeout for healthcheck
  • Loading branch information
gagan1510 authored Feb 17, 2022
2 parents 02ae065 + fb79ac2 commit 28981eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1649,13 +1649,13 @@ const microServiceProps: MicroServiceProps = { ... }

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.ami">ami</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.appName">appName</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.env">env</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.role">role</a></code> | <code><a href="#@smallcase/aws-cdk-microservice.InternalRole">InternalRole</a></code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.sshKey">sshKey</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.subnets">subnets</a></code> | <code>string[]</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.vpc">vpc</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.ami">ami</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.applicationType">applicationType</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.asgMaxSize">asgMaxSize</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@smallcase/aws-cdk-microservice.MicroServiceProps.property.asgMinSize">asgMinSize</a></code> | <code>string</code> | *No description.* |
Expand All @@ -1671,6 +1671,16 @@ const microServiceProps: MicroServiceProps = { ... }

---

##### `ami`<sup>Required</sup> <a name="ami" id="@smallcase/aws-cdk-microservice.MicroServiceProps.property.ami"></a>

```typescript
public readonly ami: string;
```

- *Type:* string

---

##### `appName`<sup>Required</sup> <a name="appName" id="@smallcase/aws-cdk-microservice.MicroServiceProps.property.appName"></a>

```typescript
Expand Down Expand Up @@ -1731,16 +1741,6 @@ public readonly vpc: string;

---

##### `ami`<sup>Optional</sup> <a name="ami" id="@smallcase/aws-cdk-microservice.MicroServiceProps.property.ami"></a>

```typescript
public readonly ami: string;
```

- *Type:* string

---

##### `applicationType`<sup>Optional</sup> <a name="applicationType" id="@smallcase/aws-cdk-microservice.MicroServiceProps.property.applicationType"></a>

```typescript
Expand Down
2 changes: 1 addition & 1 deletion src/constructs/autoScalingGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class AutoScaler extends Resource {
healthCheckPath: t.healthCheckPath!,
...((t.protocol == 'GRPC') ? { protocol: 'HTTP' } : { protocol: t.protocol }),
...((t.protocol == 'GRPC') ? { protocolVersion: 'GRPC' } : {}),
healthCheckTimeoutSeconds: 30,
healthCheckTimeoutSeconds: 5,
healthCheckPort: String(t.port!),
port: t.port!,
vpcId: vpcId,
Expand Down
4 changes: 2 additions & 2 deletions src/constructs/microservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface MicroServiceProps {
readonly diskSize?: number;
readonly role: InternalRole;
readonly tcpRules?: IngressRule[];
readonly ami?: string;
readonly ami: string;
readonly sshKey: string;
readonly diskType?: string;
readonly createCodedeployApplication?: boolean;
Expand Down Expand Up @@ -84,7 +84,7 @@ export class MicroService extends Construct {
instanceType: this.instanceType,
detailedMonitoring: false,
templateName: resourceNamePrefix + '-LT',
amiImageId: props.ami ?? 'Ubuntu Server 20.04 LTS (HVM), SSD Volume Type',
amiImageId: props.ami,
type: 'new',
blockDevice: {
size: this.diskSize,
Expand Down

0 comments on commit 28981eb

Please sign in to comment.