@studion/infra-code-blocks 0.2.0 → 0.2.1

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.
@@ -92,19 +92,23 @@ class WebServer extends pulumi.ComponentResource {
92
92
  },
93
93
  tags: Object.assign(Object.assign({}, constants_1.commonTags), { Name: `${this.name}-lb-target-group` }),
94
94
  }, { parent: this, dependsOn: [this.lb] });
95
+ const defaultAction = this.certificate
96
+ ? {
97
+ type: 'redirect',
98
+ redirect: {
99
+ port: '443',
100
+ protocol: 'HTTPS',
101
+ statusCode: 'HTTP_301',
102
+ },
103
+ }
104
+ : {
105
+ type: 'forward',
106
+ targetGroupArn: lbTargetGroup.arn,
107
+ };
95
108
  const lbHttpListener = new aws.lb.Listener(`${this.name}-lb-listener-80`, {
96
109
  loadBalancerArn: lb.arn,
97
110
  port: 80,
98
- defaultActions: [
99
- {
100
- type: 'redirect',
101
- redirect: {
102
- port: '443',
103
- protocol: 'HTTPS',
104
- statusCode: 'HTTP_301',
105
- },
106
- },
107
- ],
111
+ defaultActions: [defaultAction],
108
112
  tags: constants_1.commonTags,
109
113
  }, { parent: this });
110
114
  let lbTlsListener = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studion/infra-code-blocks",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Studion common infra components",
5
5
  "keywords": [
6
6
  "infrastructure",