@studion/infra-code-blocks 2.0.0-alpha.3 → 2.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,6 @@ export declare namespace Ec2SSMConnect {
12
12
  }
13
13
  export declare class Ec2SSMConnect extends pulumi.ComponentResource {
14
14
  name: string;
15
- vpc: pulumi.Output<awsx.ec2.Vpc>;
16
15
  ec2SecurityGroup: aws.ec2.SecurityGroup;
17
16
  role: aws.iam.Role;
18
17
  ssmProfile: aws.iam.InstanceProfile;
@@ -1 +1 @@
1
- {"version":3,"file":"ec2-ssm-connect.d.ts","sourceRoot":"","sources":["../../../src/components/database/ec2-ssm-connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAOzC,yBAAiB,aAAa,CAAC;IAC7B,KAAY,IAAI,GAAG;QACjB,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,YAAY,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;YAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SACrC,CAAC,CAAC;KACJ,CAAC;CACH;AAMD,qBAAa,aAAc,SAAQ,MAAM,CAAC,iBAAiB;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC;IACxC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;I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AC,IAAI,CAAC;IACnB,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC;IACpC,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;IACpC,sBAAsB,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;IAC5C,sBAAsB,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;IAC5C,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAGvC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,aAAa,CAAC,IAAI,EACxB,IAAI,GAAE,MAAM,CAAC,wBAA6B;CAoK7C"}
@@ -18,8 +18,8 @@ class Ec2SSMConnect extends pulumi.ComponentResource {
18
18
  ] }));
19
19
  const { vpc, instanceType, tags } = (0, merge_with_defaults_1.mergeWithDefaults)(defaults, args);
20
20
  this.name = name;
21
- this.vpc = pulumi.output(vpc);
22
- const subnetId = this.vpc.privateSubnetIds.apply(ids => ids[0]);
21
+ const vpcOutput = pulumi.output(vpc);
22
+ const subnetId = vpcOutput.privateSubnetIds.apply(ids => ids[0]);
23
23
  this.ami = aws.ec2.getAmiOutput({
24
24
  filters: [
25
25
  { name: 'architecture', values: ['arm64'] },
@@ -37,19 +37,19 @@ class Ec2SSMConnect extends pulumi.ComponentResource {
37
37
  protocol: 'tcp',
38
38
  fromPort: 22,
39
39
  toPort: 22,
40
- cidrBlocks: [this.vpc.vpc.cidrBlock],
40
+ cidrBlocks: [vpcOutput.vpc.cidrBlock],
41
41
  },
42
42
  {
43
43
  protocol: 'tcp',
44
44
  fromPort: 443,
45
45
  toPort: 443,
46
- cidrBlocks: [this.vpc.vpc.cidrBlock],
46
+ cidrBlocks: [vpcOutput.vpc.cidrBlock],
47
47
  },
48
48
  ],
49
49
  egress: [
50
50
  { protocol: '-1', fromPort: 0, toPort: 0, cidrBlocks: ['0.0.0.0/0'] },
51
51
  ],
52
- vpcId: this.vpc.vpcId,
52
+ vpcId: vpcOutput.vpcId,
53
53
  tags: common_tags_1.commonTags,
54
54
  }, { parent: this });
55
55
  this.role = new aws.iam.Role(`${this.name}-ec2-role`, {
@@ -85,7 +85,7 @@ class Ec2SSMConnect extends pulumi.ComponentResource {
85
85
  tags: Object.assign(Object.assign(Object.assign({}, common_tags_1.commonTags), { Name: `${this.name}-ec2` }), tags),
86
86
  }, { parent: this });
87
87
  this.ssmVpcEndpoint = new aws.ec2.VpcEndpoint(`${this.name}-ssm-vpc-endpoint`, {
88
- vpcId: this.vpc.vpcId,
88
+ vpcId: vpcOutput.vpcId,
89
89
  ipAddressType: 'ipv4',
90
90
  serviceName: `com.amazonaws.${awsRegion}.ssm`,
91
91
  vpcEndpointType: 'Interface',
@@ -95,7 +95,7 @@ class Ec2SSMConnect extends pulumi.ComponentResource {
95
95
  tags: common_tags_1.commonTags,
96
96
  }, { parent: this, dependsOn: [this.ec2] });
97
97
  this.ec2MessagesVpcEndpoint = new aws.ec2.VpcEndpoint(`${this.name}-ec2messages-vpc-endpoint`, {
98
- vpcId: this.vpc.vpcId,
98
+ vpcId: vpcOutput.vpcId,
99
99
  ipAddressType: 'ipv4',
100
100
  serviceName: `com.amazonaws.${awsRegion}.ec2messages`,
101
101
  vpcEndpointType: 'Interface',
@@ -105,7 +105,7 @@ class Ec2SSMConnect extends pulumi.ComponentResource {
105
105
  tags: common_tags_1.commonTags,
106
106
  }, { parent: this, dependsOn: [this.ec2] });
107
107
  this.ssmMessagesVpcEndpoint = new aws.ec2.VpcEndpoint(`${this.name}-ssmmessages-vpc-endpoint`, {
108
- vpcId: this.vpc.vpcId,
108
+ vpcId: vpcOutput.vpcId,
109
109
  ipAddressType: 'ipv4',
110
110
  serviceName: `com.amazonaws.${awsRegion}.ssmmessages`,
111
111
  vpcEndpointType: 'Interface',
@@ -68,6 +68,11 @@ export declare namespace EcsService {
68
68
  containers: EcsService.Container[];
69
69
  loadBalancers?: pulumi.Input<LoadBalancerConfig[]>;
70
70
  volumes?: pulumi.Input<pulumi.Input<EcsService.PersistentStorageVolume>[]>;
71
+ /**
72
+ * Name to set for the ECS Service.
73
+ * @default ${this.name}
74
+ */
75
+ name?: pulumi.Input<string>;
71
76
  /**
72
77
  * Type of deployment controller to use.
73
78
  * @default "ECS"
@@ -78,6 +83,11 @@ export declare namespace EcsService {
78
83
  * @default 1
79
84
  */
80
85
  desiredCount?: pulumi.Input<number>;
86
+ /**
87
+ * Family for the task definition. Used for grouping of multiple versions.
88
+ * @default ${this.name}-task-definition-${stackName}
89
+ */
90
+ family?: pulumi.Input<string>;
81
91
  /**
82
92
  * CPU and memory size used for running the container.
83
93
  * Available predefined options are:
@@ -90,6 +100,11 @@ export declare namespace EcsService {
90
100
  * @default "small"
91
101
  */
92
102
  size?: pulumi.Input<TaskSize>;
103
+ /**
104
+ * Name prefix of the AWS CloudWatch log group.
105
+ * @default /ecs/${this.name}-
106
+ */
107
+ logGroupNamePrefix?: pulumi.Input<string>;
93
108
  /**
94
109
  * Custom service security group
95
110
  * In case no security group is provided, default security group will be automatically created.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ecs-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAIrC,OAAO,EAAE,QAAQ,EAAiB,MAAM,aAAa,CAAC;AAKtD,KAAK,iBAAiB,GAAG;IACvB,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC;IAC/B,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC;CAClC,CAAC;AAEF,yBAAiB,UAAU,CAAC;IAC1B;;;;;OAKG;IACH,KAAY,uBAAuB,GAAG;QAAE,IAAI,EAAE,MAAM,C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AAc,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACtD,iBAAiB,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;IAChC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;IACvB,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;IACvD,uBAAuB,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC;IACvD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;gBAGpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,IAAI,GAAE,MAAM,CAAC,wBAA6B;WA8D9B,oBAAoB,CAChC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GACzB,GAAG,CAAC,GAAG,CAAC,WAAW;IAQtB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,oBAAoB;IAuC5B,OAAO,CAAC,2BAA2B;IAoBnC,OAAO,CAAC,yBAAyB;IA8BjC,OAAO,CAAC,uBAAuB;IAuC/B,OAAO,CAAC,cAAc;IAsCtB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,0BAA0B;IA4BlC,OAAO,CAAC,gBAAgB;IA4CxB,OAAO,CAAC,sBAAsB;IAuB9B,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,iBAAiB;IAsDzB,OAAO,CAAC,uBAAuB;CA8EhC"}
@@ -48,7 +48,7 @@ class EcsService extends pulumi.ComponentResource {
48
48
  this.name = name;
49
49
  this.securityGroups = [];
50
50
  this.vpc = pulumi.output(argsWithDefaults.vpc);
51
- this.logGroup = this.createLogGroup();
51
+ this.logGroup = this.createLogGroup(argsWithDefaults.logGroupNamePrefix);
52
52
  this.taskExecutionRole = this.createTaskExecutionRole(taskExecutionRoleInlinePolicies);
53
53
  this.taskRole = this.createTaskRole(taskRoleInlinePolicies);
54
54
  pulumi.output(argsWithDefaults.volumes).apply(volume => {
@@ -56,7 +56,7 @@ class EcsService extends pulumi.ComponentResource {
56
56
  this.persistentStorage = this.createPersistentStorage(this.vpc);
57
57
  }
58
58
  });
59
- this.taskDefinition = this.createTaskDefinition(argsWithDefaults.containers, pulumi.output(argsWithDefaults.volumes), this.taskExecutionRole, this.taskRole, argsWithDefaults.size, Object.assign(Object.assign({}, common_tags_1.commonTags), argsWithDefaults.tags));
59
+ this.taskDefinition = this.createTaskDefinition(argsWithDefaults.containers, pulumi.output(argsWithDefaults.volumes), this.taskExecutionRole, this.taskRole, argsWithDefaults.family, argsWithDefaults.size, Object.assign(Object.assign({}, common_tags_1.commonTags), argsWithDefaults.tags));
60
60
  if (argsWithDefaults.enableServiceAutoDiscovery) {
61
61
  this.serviceDiscoveryService = this.createServiceDiscovery();
62
62
  }
@@ -73,15 +73,15 @@ class EcsService extends pulumi.ComponentResource {
73
73
  protocol: 'tcp',
74
74
  };
75
75
  }
76
- createLogGroup() {
76
+ createLogGroup(namePrefix) {
77
77
  const logGroup = new aws.cloudwatch.LogGroup(`${this.name}-log-group`, {
78
78
  retentionInDays: 14,
79
- namePrefix: `/ecs/${this.name}-`,
79
+ namePrefix: namePrefix !== null && namePrefix !== void 0 ? namePrefix : `/ecs/${this.name}-`,
80
80
  tags: common_tags_1.commonTags,
81
81
  }, { parent: this });
82
82
  return logGroup;
83
83
  }
84
- createTaskDefinition(containers, volumes, taskExecutionRole, taskRole, size, tags) {
84
+ createTaskDefinition(containers, volumes, taskExecutionRole, taskRole, family, size, tags) {
85
85
  const stack = pulumi.getStack();
86
86
  const { cpu, memory } = pulumi.output(size).apply(task_size_1.parseTaskSize);
87
87
  const containerDefinitions = containers.map(container => {
@@ -90,7 +90,7 @@ class EcsService extends pulumi.ComponentResource {
90
90
  const taskDefinitionVolumes = this.createTaskDefinitionVolumes(volumes);
91
91
  return pulumi.all(containerDefinitions).apply(containerDefinitions => {
92
92
  return taskDefinitionVolumes.apply(volumes => {
93
- return new aws.ecs.TaskDefinition(`${this.name}-task-definition`, Object.assign(Object.assign({ family: `${this.name}-task-definition-${stack}`, networkMode: 'awsvpc', executionRoleArn: taskExecutionRole.arn, taskRoleArn: taskRole.arn, cpu,
93
+ return new aws.ecs.TaskDefinition(`${this.name}-task-definition`, Object.assign(Object.assign({ family: family !== null && family !== void 0 ? family : `${this.name}-task-definition-${stack}`, networkMode: 'awsvpc', executionRoleArn: taskExecutionRole.arn, taskRoleArn: taskRole.arn, cpu,
94
94
  memory, requiresCompatibilities: ['FARGATE'], containerDefinitions: JSON.stringify(containerDefinitions) }, ((volumes === null || volumes === void 0 ? void 0 : volumes.length) ? { volumes } : {})), { tags: Object.assign(Object.assign({}, common_tags_1.commonTags), tags) }), { parent: this });
95
95
  });
96
96
  });
@@ -221,6 +221,7 @@ class EcsService extends pulumi.ComponentResource {
221
221
  this.addSecurityGroup(securityGroup);
222
222
  }
223
223
  createEcsService(ecsServiceArgs) {
224
+ var _a;
224
225
  if (ecsServiceArgs.securityGroup) {
225
226
  this.addSecurityGroup(ecsServiceArgs.securityGroup);
226
227
  }
@@ -236,7 +237,7 @@ class EcsService extends pulumi.ComponentResource {
236
237
  .all(this.securityGroups)
237
238
  .apply(groups => groups.map(it => it.id)),
238
239
  };
239
- return new aws.ecs.Service(`${this.name}-service`, Object.assign(Object.assign(Object.assign({ name: this.name, cluster: pulumi.output(ecsServiceArgs.cluster).id, launchType: 'FARGATE', deploymentController: { type: ecsServiceArgs.deploymentController }, desiredCount: ecsServiceArgs.desiredCount, taskDefinition: this.taskDefinition.arn, enableExecuteCommand: true, networkConfiguration }, (ecsServiceArgs.loadBalancers && {
240
+ return new aws.ecs.Service(`${this.name}-service`, Object.assign(Object.assign(Object.assign({ name: (_a = ecsServiceArgs.name) !== null && _a !== void 0 ? _a : this.name, cluster: pulumi.output(ecsServiceArgs.cluster).id, launchType: 'FARGATE', deploymentController: { type: ecsServiceArgs.deploymentController }, desiredCount: ecsServiceArgs.desiredCount, taskDefinition: this.taskDefinition.arn, enableExecuteCommand: true, networkConfiguration }, (ecsServiceArgs.loadBalancers && {
240
241
  loadBalancers: ecsServiceArgs.loadBalancers,
241
242
  })), (this.serviceDiscoveryService && {
242
243
  serviceRegistries: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/vpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAKrC,MAAM,MAAM,OAAO,GAAG;IACpB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KACrC,CAAC,CAAC;CACJ,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,qBAAa,GAAI,SAAQ,MAAM,CAAC,iBAAiB;IAC/C,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAGhB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,IAAI,GAAE,MAAM,CAAC,wBAA6B;CAyB7C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/vpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAKrC,MAAM,MAAM,OAAO,GAAG;IACpB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KACrC,CAAC,CAAC;CACJ,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,qBAAa,GAAI,SAAQ,MAAM,CAAC,iBAAiB;IAC/C,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAGhB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,IAAI,GAAE,MAAM,CAAC,wBAA6B;CA4B7C"}
@@ -18,9 +18,12 @@ class Vpc extends pulumi.ComponentResource {
18
18
  enableDnsHostnames: true,
19
19
  enableDnsSupport: true,
20
20
  subnetStrategy: types_1.enums.ec2.SubnetAllocationStrategy.Auto,
21
+ // Switching from `Legacy` to `Auto` strategy changed ordering of the specs
22
+ // `Auto` is using the provided ordering, while `Legacy` enforced `Private`, `Public`, `Isolated` ordering
23
+ // Applying ordering to match one from `Legacy` to avoid breaking changes
21
24
  subnetSpecs: [
22
- { type: awsx.ec2.SubnetType.Public, cidrMask: 24 },
23
25
  { type: awsx.ec2.SubnetType.Private, cidrMask: 24 },
26
+ { type: awsx.ec2.SubnetType.Public, cidrMask: 24 },
24
27
  { type: awsx.ec2.SubnetType.Isolated, cidrMask: 24 },
25
28
  ],
26
29
  tags: Object.assign(Object.assign({}, common_tags_1.commonTags), argsWithDefaults.tags),
@@ -22,14 +22,14 @@ export declare class WebServerBuilder {
22
22
  private _sidecarContainers;
23
23
  private _volumes;
24
24
  constructor(name: string);
25
- configureWebServer(image: WebServer.Container['image'], port: WebServer.Container['port'], config?: Omit<WebServer.Container, 'image' | 'port'>): this;
26
- configureEcs(config: WebServerBuilder.EcsConfig): this;
25
+ withContainer(image: WebServer.Container['image'], port: WebServer.Container['port'], config?: Omit<WebServer.Container, 'image' | 'port'>): this;
26
+ withEcsConfig(config: WebServerBuilder.EcsConfig): this;
27
27
  withVpc(vpc: pulumi.Input<awsx.ec2.Vpc>): this;
28
28
  withVolume(volume: EcsService.PersistentStorageVolume): this;
29
29
  withCustomDomain(domain: pulumi.Input<string>, hostedZoneId: pulumi.Input<string>): this;
30
30
  withCertificate(certificate: WebServerBuilder.Args['certificate'], hostedZoneId: pulumi.Input<string>, domain?: pulumi.Input<string>): this;
31
- withInitContainer(container: WebServer.InitContainer): this;
32
- withSidecarContainer(container: WebServer.SidecarContainer): this;
31
+ addInitContainer(container: WebServer.InitContainer): this;
32
+ addSidecarContainer(container: WebServer.SidecarContainer): this;
33
33
  withOtelCollector(collector: OtelCollector): this;
34
34
  withCustomHealthCheckPath(path: WebServer.Args['healthCheckPath']): this;
35
35
  withLoadBalancingAlgorithm(algorithm: pulumi.Input<string>): this;
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/components/web-server/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,yBAAiB,gBAAgB,CAAC;IAChC,KAAY,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,CAAC,CAAC;IAErE,KAAY,IAAI,GAAG,IAAI,CACrB,SAAS,CAAC,IAAI,EACZ,KAAK,GACL,SAAS,GACT,SAAS,GACT,QAAQ,GACR,cAAc,GACd,qBAAqB,CACxB,CAAC;CACH;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAC,CAAsB;IACzC,OAAO,CAAC,IAAI,CAAC,CAA8B;IAC3C,OAAO,CAAC,UAAU,CAAC,CAA6B;IAChD,OAAO,CAAC,OAAO,CAAC,CAAuB;IACvC,OAAO,CAAC,aAAa,CAAC,CA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,IAAI,GAAE,MAAM,CAAC,wBAA6B,GAAG,SAAS;CAoCpE"}
@@ -10,18 +10,21 @@ class WebServerBuilder {
10
10
  this._volumes = [];
11
11
  this._name = name;
12
12
  }
13
- configureWebServer(image, port, config = {}) {
13
+ withContainer(image, port, config = {}) {
14
14
  this._container = Object.assign({ image,
15
15
  port }, config);
16
16
  return this;
17
17
  }
18
- configureEcs(config) {
18
+ withEcsConfig(config) {
19
19
  this._ecsConfig = {
20
20
  cluster: config.cluster,
21
+ name: config.name,
21
22
  deploymentController: config.deploymentController,
22
23
  desiredCount: config.desiredCount,
23
24
  autoscaling: config.autoscaling,
25
+ family: config.family,
24
26
  size: config.size,
27
+ logGroupNamePrefix: config.logGroupNamePrefix,
25
28
  taskExecutionRoleInlinePolicies: config.taskExecutionRoleInlinePolicies,
26
29
  taskRoleInlinePolicies: config.taskRoleInlinePolicies,
27
30
  tags: config.tags,
@@ -47,11 +50,11 @@ class WebServerBuilder {
47
50
  this._domain = domain;
48
51
  return this;
49
52
  }
50
- withInitContainer(container) {
53
+ addInitContainer(container) {
51
54
  this._initContainers.push(container);
52
55
  return this;
53
56
  }
54
- withSidecarContainer(container) {
57
+ addSidecarContainer(container) {
55
58
  this._sidecarContainers.push(container);
56
59
  return this;
57
60
  }
@@ -69,10 +72,10 @@ class WebServerBuilder {
69
72
  }
70
73
  build(opts = {}) {
71
74
  if (!this._container) {
72
- throw new Error('Web server not configured. Make sure to call WebServerBuilder.configureWebServer().');
75
+ throw new Error('Web server not configured. Make sure to call WebServerBuilder.withContainer().');
73
76
  }
74
77
  if (!this._ecsConfig) {
75
- throw new Error('ECS not configured. Make sure to call WebServerBuilder.configureEcs().');
78
+ throw new Error('ECS not configured. Make sure to call WebServerBuilder.withEcsConfig().');
76
79
  }
77
80
  if (!this._vpc) {
78
81
  throw new Error('VPC not provided. Make sure to call WebServerBuilder.withVpc().');
@@ -8,7 +8,7 @@ export declare namespace WebServer {
8
8
  type Container = Pick<EcsService.Container, 'image' | 'environment' | 'secrets' | 'mountPoints'> & {
9
9
  port: pulumi.Input<number>;
10
10
  };
11
- type EcsConfig = Pick<EcsService.Args, 'cluster' | 'vpc' | 'volumes' | 'deploymentController' | 'desiredCount' | 'autoscaling' | 'size' | 'taskExecutionRoleInlinePolicies' | 'taskRoleInlinePolicies' | 'tags'>;
11
+ type EcsConfig = Pick<EcsService.Args, 'cluster' | 'vpc' | 'volumes' | 'name' | 'deploymentController' | 'desiredCount' | 'autoscaling' | 'family' | 'size' | 'logGroupNamePrefix' | 'taskExecutionRoleInlinePolicies' | 'taskRoleInlinePolicies' | 'tags'>;
12
12
  type InitContainer = Omit<EcsService.Container, 'essential'>;
13
13
  type SidecarContainer = Omit<EcsService.Container, 'essential' | 'healthCheck'> & Required<Pick<EcsService.Container, 'healthCheck'>>;
14
14
  type Args = EcsConfig & Container & {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/web-server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,yBAAiB,SAAS,CAAC;IACzB,KAAY,SAAS,GAAG,IAAI,CAC1B,UAAU,CAAC,SAAS,EACpB,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,CACpD,GAAG;QACF,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KAC5B,CAAC;IAEF,KAAY,SAAS,GAAG,IAAI,CAC1B,UAAU,CAAC,IAAI,EACb,SAAS,GACT,KAAK,GACL,SAAS,GACT,sBAAsB,GACtB,cAAc,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CAAC,oBAAoB;IAc5B,OAAO,CAAC,yBAAyB;IAoBjC,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,wBAAwB;IAUhC,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,mBAAmB;IA8B3B,OAAO,CAAC,gBAAgB;IAkDxB,OAAO,CAAC,gBAAgB;CA+BzB"}
@@ -97,10 +97,13 @@ class WebServer extends pulumi.ComponentResource {
97
97
  return {
98
98
  vpc: args.vpc,
99
99
  cluster: args.cluster,
100
+ name: args.name,
100
101
  deploymentController: args.deploymentController,
101
102
  desiredCount: args.desiredCount,
102
103
  autoscaling: args.autoscaling,
104
+ family: args.family,
103
105
  size: args.size,
106
+ logGroupNamePrefix: args.logGroupNamePrefix,
104
107
  taskExecutionRoleInlinePolicies: args.taskExecutionRoleInlinePolicies,
105
108
  taskRoleInlinePolicies: this.getTaskRoleInlinePolicies(args),
106
109
  tags: args.tags,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studion/infra-code-blocks",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.4",
4
4
  "description": "Studion common infra components",
5
5
  "keywords": [
6
6
  "infrastructure",
@@ -83,11 +83,14 @@
83
83
  "overrides": {
84
84
  "@pulumi/pulumi": {
85
85
  "glob": "10.5.0",
86
- "minimatch": "10.2.2",
86
+ "minimatch": "10.2.4",
87
87
  "tar": "7.5.9"
88
88
  },
89
89
  "@aws-sdk/core": {
90
90
  "fast-xml-parser": "5.3.6"
91
+ },
92
+ "get-uri": {
93
+ "basic-ftp": "5.2.0"
91
94
  }
92
95
  },
93
96
  "publishConfig": {