@gradientedge/cdk-utils 8.95.0 → 8.97.0

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.
@@ -71,7 +71,7 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
71
71
  */
72
72
  resolveVpc() {
73
73
  if (this.props.useExistingVpc) {
74
- this.restApivpc = this.vpcManager.retrieveCommonVpc(`${this.id}`, this, this.props.vpcName);
74
+ this.restApivpc = this.vpcManager.retrieveCommonVpc(`${this.id}-vpc`, this, this.props.vpcName);
75
75
  }
76
76
  else {
77
77
  this.restApivpc = this.vpcManager.createCommonVpc(this, this.props.restApiVpc, this.props.restApiVpc.vpcName);
@@ -82,7 +82,7 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
82
82
  */
83
83
  resolveSecurityGroup() {
84
84
  if (this.props.securityGroupExportName) {
85
- this.restApiSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(this, `${this.id}`, cdk.Fn.importValue(this.props.securityGroupExportName));
85
+ this.restApiSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(this, `${this.id}-security-group`, cdk.Fn.importValue(this.props.securityGroupExportName));
86
86
  }
87
87
  else {
88
88
  this.restApiSecurityGroup = new ec2.SecurityGroup(this, `${this.id}-security-group-${this.props.stage}`, {
@@ -371,7 +371,7 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
371
371
  * Method to create Site distribution
372
372
  */
373
373
  createDistribution() {
374
- this.siteDistribution = this.cloudFrontManager.createDistributionWithHttpOrigin(`${this.id}-distribution`, this, this.props.siteDistribution, this.siteOrigin, this.siteDomainNames, this.siteLogBucket, this.siteCertificate, this.siteFunctionAssociations);
374
+ this.siteDistribution = this.cloudFrontManager.createDistributionWithHttpOrigin(`${this.id}-distribution`, this, this.props.siteDistribution, this.siteOrigin, this.siteDomainNames, this.siteLogBucket, this.siteCertificate, this.siteFunctionAssociations, this.props.siteDistribution.defaultBehavior.responseHeadersPolicy);
375
375
  }
376
376
  /**
377
377
  * Method to create Route53 records for distribution
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.95.0",
3
+ "version": "8.97.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -54,7 +54,7 @@ export abstract class RestApiLambdaWithCache extends RestApiLambda {
54
54
  */
55
55
  protected resolveVpc() {
56
56
  if (this.props.useExistingVpc) {
57
- this.restApivpc = this.vpcManager.retrieveCommonVpc(`${this.id}`, this, this.props.vpcName)
57
+ this.restApivpc = this.vpcManager.retrieveCommonVpc(`${this.id}-vpc`, this, this.props.vpcName)
58
58
  } else {
59
59
  this.restApivpc = this.vpcManager.createCommonVpc(this, this.props.restApiVpc, this.props.restApiVpc.vpcName)
60
60
  }
@@ -67,7 +67,7 @@ export abstract class RestApiLambdaWithCache extends RestApiLambda {
67
67
  if (this.props.securityGroupExportName) {
68
68
  this.restApiSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(
69
69
  this,
70
- `${this.id}`,
70
+ `${this.id}-security-group`,
71
71
  cdk.Fn.importValue(this.props.securityGroupExportName)
72
72
  )
73
73
  } else {
@@ -448,7 +448,8 @@ export class SiteWithEcsBackend extends CommonConstruct {
448
448
  this.siteDomainNames,
449
449
  this.siteLogBucket,
450
450
  this.siteCertificate,
451
- this.siteFunctionAssociations
451
+ this.siteFunctionAssociations,
452
+ this.props.siteDistribution.defaultBehavior.responseHeadersPolicy
452
453
  )
453
454
  }
454
455