Skip to content

Commit 36b9081

Browse files
committed
Use ecr stack name variable in beta deploy user stack
1 parent f62fabf commit 36b9081

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
template: cloud-formation/ecr.yaml
3737
no-fail-on-empty-changeset: 1
3838

39-
4039
- name: Beta Deploy User
4140
uses: aws-actions/aws-cloudformation-github-deploy@v1
4241
with:
4342
name: GoCaptureBetaDeployUser
4443
template: cloud-formation/beta-deploy-user.yaml
44+
parameter-overrides: EcrStackName=${{ steps.ecr-stack-name.outputs.ECR_STACK_NAME }}
4545
capabilities: CAPABILITY_NAMED_IAM
4646
no-fail-on-empty-changeset: 1
4747

cloud-formation/beta-deploy-user.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2+
Parameters:
3+
EcrStackName:
4+
Type: String
25
Resources:
36
BetaDeployUser:
47
Type: AWS::IAM::User
@@ -23,6 +26,8 @@ Resources:
2326
- ecr:DescribeRepositories
2427
- ecr:GetDownloadUrlForLayer
2528
- ecr:ListImages
26-
Resource: !ImportValue GoCaptureECR-RepositoryArn
29+
Resource:
30+
Fn::ImportValue:
31+
Fn::Sub: ${EcrStackName}-RepositoryArn
2732
Users:
2833
- !Ref BetaDeployUser

0 commit comments

Comments
 (0)