Skip to content

Commit 2bb636f

Browse files
check aws_ack_auth_enabled for CF stack (#4099)
1 parent 234d0b2 commit 2bb636f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

dashboard/src/components/CloudFormationForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ const CloudFormationForm: React.FC<Props> = ({
222222
setCurrentStep(3)
223223
const externalId = getExternalId();
224224
let trustArn = process.env.TRUST_ARN ? process.env.TRUST_ARN : "arn:aws:iam::108458755588:role/CAPIManagement";
225-
const cloudformation_url = `https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?templateURL=https://porter-role.s3.us-east-2.amazonaws.com/cloudformation-policy.json&stackName=PorterRole&param_ExternalIdParameter=${externalId}&param_TrustArnParameter=${trustArn}`
225+
let cloudformation_url = `https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?templateURL=https://porter-role.s3.us-east-2.amazonaws.com/cloudformation-policy.json&stackName=PorterRole&param_ExternalIdParameter=${externalId}&param_TrustArnParameter=${trustArn}`
226+
if (currentProject.aws_ack_auth_enabled === true) {
227+
cloudformation_url = `https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?templateURL=https://porter-role.s3.us-east-2.amazonaws.com/cloudformation-access-policy.json&stackName=PorterRole&param_TrustArnParameter=${trustArn}`
228+
}
226229
markStepStarted({ step: "aws-cloudformation-redirect-success", account_id: AWSAccountID, cloudformation_url, external_id: externalId })
227230
window.open(cloudformation_url, "_blank")
228231
setHasClickedCloudformationButton(true);

dashboard/src/shared/types.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ export type ProjectType = {
293293
stacks_enabled: boolean;
294294
validate_apply_v2: boolean;
295295
managed_deployment_targets_enabled: boolean;
296+
aws_ack_auth_enabled: boolean;
296297
roles: Array<{
297298
id: number;
298299
kind: string;

0 commit comments

Comments
 (0)