Skip to content

Commit

Permalink
Fix: STG Deployment (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamputraintan authored Jul 1, 2024
1 parent 04bca50 commit b393f68
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
4 changes: 4 additions & 0 deletions cdk.context.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,9 @@
]
}
]
},
"security-group:account=843407916570:region=ap-southeast-2:securityGroupName=OrcaBusSharedComputeSecurityGroup:vpcId=vpc-00eafc63c0dfca266": {
"securityGroupId": "sg-03abb47eba799e044",
"allowAllOutbound": false
}
}
37 changes: 20 additions & 17 deletions lib/pipeline/statefulPipelineStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,26 @@ export class StatefulPipelineStack extends cdk.Stack {
{ pre: [new pipelines.ManualApprovalStep('PromoteToGamma')] }
);

/**
* Deployment to Prod account (DISABLED)
*/
const prodConfig = getEnvironmentConfig(AppStage.PROD);
if (!prodConfig) throw new Error(`No 'Prod' account configuration`);
pipeline.addStage(
new OrcaBusStatefulDeploymentStage(
this,
'OrcaBusProd',
prodConfig.stackProps.statefulConfig,
{
account: prodConfig.accountId,
region: prodConfig.region,
}
),
{ pre: [new pipelines.ManualApprovalStep('PromoteToProd')] }
);
// Some stack have dependencies to the 'shared stack' so we need to deploy it first beforehand
// should only be a one-off initial deployment
//
// /**
// * Deployment to Prod account
// */
// const prodConfig = getEnvironmentConfig(AppStage.PROD);
// if (!prodConfig) throw new Error(`No 'Prod' account configuration`);
// pipeline.addStage(
// new OrcaBusStatefulDeploymentStage(
// this,
// 'OrcaBusProd',
// prodConfig.stackProps.statefulConfig,
// {
// account: prodConfig.accountId,
// region: prodConfig.region,
// }
// ),
// { pre: [new pipelines.ManualApprovalStep('PromoteToProd')] }
// );

// need to build pipeline so we could add notification at the pipeline construct
pipeline.buildPipeline();
Expand Down
9 changes: 6 additions & 3 deletions lib/workload/components/api-gateway/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ export class ApiGatewayConstruct extends Construct {
super(scope, id);

// umccr acm arn
const umccrAcmArn = StringParameter.valueFromLookup(this, '/umccr/certificate_arn');
const hostedDomainName = StringParameter.valueFromLookup(this, '/hosted_zone/umccr/name');
const hostedZoneId = StringParameter.valueFromLookup(this, '/hosted_zone/umccr/id');
const umccrAcmArn = StringParameter.valueForStringParameter(this, '/umccr/certificate_arn');
const hostedDomainName = StringParameter.valueForStringParameter(
this,
'/hosted_zone/umccr/name'
);
const hostedZoneId = StringParameter.valueForStringParameter(this, '/hosted_zone/umccr/id');

const domainName = `${props.customDomainNamePrefix}.${hostedDomainName}`;
const apiGWDomainName = new DomainName(this, 'UmccrDomainName', {
Expand Down

0 comments on commit b393f68

Please sign in to comment.