Skip to content

Commit 946412b

Browse files
authored
chore(codepipeline): add missing action for EcsDeployAction (#29401)
### Issue # (if applicable) Closes #29400 ### Reason for this change Missing required action as described from the [doc](https://docs.aws.amazon.com/codepipeline/latest/userguide/security-iam.html#how-to-custom-role). ### Description of changes ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 7994733 commit 946412b

File tree

7 files changed

+105
-95
lines changed

7 files changed

+105
-95
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.js.snapshot/aws-cdk-codepipeline-ecs-deploy.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.js.snapshot/aws-cdk-codepipeline-ecs-deploy.template.json

+41-40
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
"VPCPublicSubnet1SubnetB4246D30": {
1919
"Type": "AWS::EC2::Subnet",
2020
"Properties": {
21-
"VpcId": {
22-
"Ref": "VPCB9E5F0B4"
23-
},
2421
"AvailabilityZone": {
2522
"Fn::Select": [
2623
0,
@@ -44,21 +41,24 @@
4441
"Key": "Name",
4542
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1"
4643
}
47-
]
44+
],
45+
"VpcId": {
46+
"Ref": "VPCB9E5F0B4"
47+
}
4848
}
4949
},
5050
"VPCPublicSubnet1RouteTableFEE4B781": {
5151
"Type": "AWS::EC2::RouteTable",
5252
"Properties": {
53-
"VpcId": {
54-
"Ref": "VPCB9E5F0B4"
55-
},
5653
"Tags": [
5754
{
5855
"Key": "Name",
5956
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1"
6057
}
61-
]
58+
],
59+
"VpcId": {
60+
"Ref": "VPCB9E5F0B4"
61+
}
6262
}
6363
},
6464
"VPCPublicSubnet1RouteTableAssociation0B0896DC": {
@@ -75,12 +75,12 @@
7575
"VPCPublicSubnet1DefaultRoute91CEF279": {
7676
"Type": "AWS::EC2::Route",
7777
"Properties": {
78-
"RouteTableId": {
79-
"Ref": "VPCPublicSubnet1RouteTableFEE4B781"
80-
},
8178
"DestinationCidrBlock": "0.0.0.0/0",
8279
"GatewayId": {
8380
"Ref": "VPCIGWB7E252D3"
81+
},
82+
"RouteTableId": {
83+
"Ref": "VPCPublicSubnet1RouteTableFEE4B781"
8484
}
8585
},
8686
"DependsOn": [
@@ -102,15 +102,15 @@
102102
"VPCPublicSubnet1NATGatewayE0556630": {
103103
"Type": "AWS::EC2::NatGateway",
104104
"Properties": {
105-
"SubnetId": {
106-
"Ref": "VPCPublicSubnet1SubnetB4246D30"
107-
},
108105
"AllocationId": {
109106
"Fn::GetAtt": [
110107
"VPCPublicSubnet1EIP6AD938E8",
111108
"AllocationId"
112109
]
113110
},
111+
"SubnetId": {
112+
"Ref": "VPCPublicSubnet1SubnetB4246D30"
113+
},
114114
"Tags": [
115115
{
116116
"Key": "Name",
@@ -126,9 +126,6 @@
126126
"VPCPrivateSubnet1Subnet8BCA10E0": {
127127
"Type": "AWS::EC2::Subnet",
128128
"Properties": {
129-
"VpcId": {
130-
"Ref": "VPCB9E5F0B4"
131-
},
132129
"AvailabilityZone": {
133130
"Fn::Select": [
134131
0,
@@ -152,21 +149,24 @@
152149
"Key": "Name",
153150
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1"
154151
}
155-
]
152+
],
153+
"VpcId": {
154+
"Ref": "VPCB9E5F0B4"
155+
}
156156
}
157157
},
158158
"VPCPrivateSubnet1RouteTableBE8A6027": {
159159
"Type": "AWS::EC2::RouteTable",
160160
"Properties": {
161-
"VpcId": {
162-
"Ref": "VPCB9E5F0B4"
163-
},
164161
"Tags": [
165162
{
166163
"Key": "Name",
167164
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1"
168165
}
169-
]
166+
],
167+
"VpcId": {
168+
"Ref": "VPCB9E5F0B4"
169+
}
170170
}
171171
},
172172
"VPCPrivateSubnet1RouteTableAssociation347902D1": {
@@ -183,12 +183,12 @@
183183
"VPCPrivateSubnet1DefaultRouteAE1D6490": {
184184
"Type": "AWS::EC2::Route",
185185
"Properties": {
186-
"RouteTableId": {
187-
"Ref": "VPCPrivateSubnet1RouteTableBE8A6027"
188-
},
189186
"DestinationCidrBlock": "0.0.0.0/0",
190187
"NatGatewayId": {
191188
"Ref": "VPCPublicSubnet1NATGatewayE0556630"
189+
},
190+
"RouteTableId": {
191+
"Ref": "VPCPrivateSubnet1RouteTableBE8A6027"
192192
}
193193
}
194194
},
@@ -206,11 +206,11 @@
206206
"VPCVPCGW99B986DC": {
207207
"Type": "AWS::EC2::VPCGatewayAttachment",
208208
"Properties": {
209-
"VpcId": {
210-
"Ref": "VPCB9E5F0B4"
211-
},
212209
"InternetGatewayId": {
213210
"Ref": "VPCIGWB7E252D3"
211+
},
212+
"VpcId": {
213+
"Ref": "VPCB9E5F0B4"
214214
}
215215
}
216216
},
@@ -492,6 +492,10 @@
492492
"Artifacts": {
493493
"Type": "CODEPIPELINE"
494494
},
495+
"Cache": {
496+
"Type": "NO_CACHE"
497+
},
498+
"EncryptionKey": "alias/aws/s3",
495499
"Environment": {
496500
"ComputeType": "BUILD_GENERAL1_SMALL",
497501
"EnvironmentVariables": [
@@ -562,11 +566,7 @@
562566
"Source": {
563567
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": \"$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)\"\n },\n \"build\": {\n \"commands\": \"docker build -t $REPOSITORY_URI:latest .\"\n },\n \"post_build\": {\n \"commands\": [\n \"docker push $REPOSITORY_URI:latest\",\n \"printf '[{ \\\"name\\\": \\\"Container\\\", \\\"imageUri\\\": \\\"%s\\\" }]' $REPOSITORY_URI:latest > imagedefinitions.json\"\n ]\n }\n },\n \"artifacts\": {\n \"files\": \"imagedefinitions.json\"\n }\n}",
564568
"Type": "CODEPIPELINE"
565-
},
566-
"Cache": {
567-
"Type": "NO_CACHE"
568-
},
569-
"EncryptionKey": "alias/aws/s3"
569+
}
570570
}
571571
},
572572
"MyPipelineRoleC0D47CA4": {
@@ -666,6 +666,12 @@
666666
"MyPipelineAED38ECF": {
667667
"Type": "AWS::CodePipeline::Pipeline",
668668
"Properties": {
669+
"ArtifactStore": {
670+
"Location": {
671+
"Ref": "MyBucketF68F3FF0"
672+
},
673+
"Type": "S3"
674+
},
669675
"RoleArn": {
670676
"Fn::GetAtt": [
671677
"MyPipelineRoleC0D47CA4",
@@ -779,13 +785,7 @@
779785
],
780786
"Name": "Deploy"
781787
}
782-
],
783-
"ArtifactStore": {
784-
"Location": {
785-
"Ref": "MyBucketF68F3FF0"
786-
},
787-
"Type": "S3"
788-
}
788+
]
789789
},
790790
"DependsOn": [
791791
"MyPipelineRoleDefaultPolicy34F09EFA",
@@ -1010,6 +1010,7 @@
10101010
"ecs:DescribeTasks",
10111011
"ecs:ListTasks",
10121012
"ecs:RegisterTaskDefinition",
1013+
"ecs:TagResource",
10131014
"ecs:UpdateService"
10141015
],
10151016
"Effect": "Allow",

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.js.snapshot/manifest.json

+9-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)