Skip to content

Commit

Permalink
chore(codepipeline): add missing action for EcsDeployAction (#29401)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
pahud authored Mar 8, 2024
1 parent 7994733 commit 946412b
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 95 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"VPCPublicSubnet1SubnetB4246D30": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": {
"Fn::Select": [
0,
Expand All @@ -44,21 +41,24 @@
"Key": "Name",
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1"
}
]
],
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
}
},
"VPCPublicSubnet1RouteTableFEE4B781": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1"
}
]
],
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
}
},
"VPCPublicSubnet1RouteTableAssociation0B0896DC": {
Expand All @@ -75,12 +75,12 @@
"VPCPublicSubnet1DefaultRoute91CEF279": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "VPCPublicSubnet1RouteTableFEE4B781"
},
"DestinationCidrBlock": "0.0.0.0/0",
"GatewayId": {
"Ref": "VPCIGWB7E252D3"
},
"RouteTableId": {
"Ref": "VPCPublicSubnet1RouteTableFEE4B781"
}
},
"DependsOn": [
Expand All @@ -102,15 +102,15 @@
"VPCPublicSubnet1NATGatewayE0556630": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"SubnetId": {
"Ref": "VPCPublicSubnet1SubnetB4246D30"
},
"AllocationId": {
"Fn::GetAtt": [
"VPCPublicSubnet1EIP6AD938E8",
"AllocationId"
]
},
"SubnetId": {
"Ref": "VPCPublicSubnet1SubnetB4246D30"
},
"Tags": [
{
"Key": "Name",
Expand All @@ -126,9 +126,6 @@
"VPCPrivateSubnet1Subnet8BCA10E0": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"AvailabilityZone": {
"Fn::Select": [
0,
Expand All @@ -152,21 +149,24 @@
"Key": "Name",
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1"
}
]
],
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
}
},
"VPCPrivateSubnet1RouteTableBE8A6027": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1"
}
]
],
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
}
},
"VPCPrivateSubnet1RouteTableAssociation347902D1": {
Expand All @@ -183,12 +183,12 @@
"VPCPrivateSubnet1DefaultRouteAE1D6490": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "VPCPrivateSubnet1RouteTableBE8A6027"
},
"DestinationCidrBlock": "0.0.0.0/0",
"NatGatewayId": {
"Ref": "VPCPublicSubnet1NATGatewayE0556630"
},
"RouteTableId": {
"Ref": "VPCPrivateSubnet1RouteTableBE8A6027"
}
}
},
Expand All @@ -206,11 +206,11 @@
"VPCVPCGW99B986DC": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "VPCB9E5F0B4"
},
"InternetGatewayId": {
"Ref": "VPCIGWB7E252D3"
},
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
}
},
Expand Down Expand Up @@ -492,6 +492,10 @@
"Artifacts": {
"Type": "CODEPIPELINE"
},
"Cache": {
"Type": "NO_CACHE"
},
"EncryptionKey": "alias/aws/s3",
"Environment": {
"ComputeType": "BUILD_GENERAL1_SMALL",
"EnvironmentVariables": [
Expand Down Expand Up @@ -562,11 +566,7 @@
"Source": {
"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}",
"Type": "CODEPIPELINE"
},
"Cache": {
"Type": "NO_CACHE"
},
"EncryptionKey": "alias/aws/s3"
}
}
},
"MyPipelineRoleC0D47CA4": {
Expand Down Expand Up @@ -666,6 +666,12 @@
"MyPipelineAED38ECF": {
"Type": "AWS::CodePipeline::Pipeline",
"Properties": {
"ArtifactStore": {
"Location": {
"Ref": "MyBucketF68F3FF0"
},
"Type": "S3"
},
"RoleArn": {
"Fn::GetAtt": [
"MyPipelineRoleC0D47CA4",
Expand Down Expand Up @@ -779,13 +785,7 @@
],
"Name": "Deploy"
}
],
"ArtifactStore": {
"Location": {
"Ref": "MyBucketF68F3FF0"
},
"Type": "S3"
}
]
},
"DependsOn": [
"MyPipelineRoleDefaultPolicy34F09EFA",
Expand Down Expand Up @@ -1010,6 +1010,7 @@
"ecs:DescribeTasks",
"ecs:ListTasks",
"ecs:RegisterTaskDefinition",
"ecs:TagResource",
"ecs:UpdateService"
],
"Effect": "Allow",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 946412b

Please sign in to comment.