|
18 | 18 | "VPCPublicSubnet1SubnetB4246D30": {
|
19 | 19 | "Type": "AWS::EC2::Subnet",
|
20 | 20 | "Properties": {
|
21 |
| - "VpcId": { |
22 |
| - "Ref": "VPCB9E5F0B4" |
23 |
| - }, |
24 | 21 | "AvailabilityZone": {
|
25 | 22 | "Fn::Select": [
|
26 | 23 | 0,
|
|
44 | 41 | "Key": "Name",
|
45 | 42 | "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1"
|
46 | 43 | }
|
47 |
| - ] |
| 44 | + ], |
| 45 | + "VpcId": { |
| 46 | + "Ref": "VPCB9E5F0B4" |
| 47 | + } |
48 | 48 | }
|
49 | 49 | },
|
50 | 50 | "VPCPublicSubnet1RouteTableFEE4B781": {
|
51 | 51 | "Type": "AWS::EC2::RouteTable",
|
52 | 52 | "Properties": {
|
53 |
| - "VpcId": { |
54 |
| - "Ref": "VPCB9E5F0B4" |
55 |
| - }, |
56 | 53 | "Tags": [
|
57 | 54 | {
|
58 | 55 | "Key": "Name",
|
59 | 56 | "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PublicSubnet1"
|
60 | 57 | }
|
61 |
| - ] |
| 58 | + ], |
| 59 | + "VpcId": { |
| 60 | + "Ref": "VPCB9E5F0B4" |
| 61 | + } |
62 | 62 | }
|
63 | 63 | },
|
64 | 64 | "VPCPublicSubnet1RouteTableAssociation0B0896DC": {
|
|
75 | 75 | "VPCPublicSubnet1DefaultRoute91CEF279": {
|
76 | 76 | "Type": "AWS::EC2::Route",
|
77 | 77 | "Properties": {
|
78 |
| - "RouteTableId": { |
79 |
| - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" |
80 |
| - }, |
81 | 78 | "DestinationCidrBlock": "0.0.0.0/0",
|
82 | 79 | "GatewayId": {
|
83 | 80 | "Ref": "VPCIGWB7E252D3"
|
| 81 | + }, |
| 82 | + "RouteTableId": { |
| 83 | + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" |
84 | 84 | }
|
85 | 85 | },
|
86 | 86 | "DependsOn": [
|
|
102 | 102 | "VPCPublicSubnet1NATGatewayE0556630": {
|
103 | 103 | "Type": "AWS::EC2::NatGateway",
|
104 | 104 | "Properties": {
|
105 |
| - "SubnetId": { |
106 |
| - "Ref": "VPCPublicSubnet1SubnetB4246D30" |
107 |
| - }, |
108 | 105 | "AllocationId": {
|
109 | 106 | "Fn::GetAtt": [
|
110 | 107 | "VPCPublicSubnet1EIP6AD938E8",
|
111 | 108 | "AllocationId"
|
112 | 109 | ]
|
113 | 110 | },
|
| 111 | + "SubnetId": { |
| 112 | + "Ref": "VPCPublicSubnet1SubnetB4246D30" |
| 113 | + }, |
114 | 114 | "Tags": [
|
115 | 115 | {
|
116 | 116 | "Key": "Name",
|
|
126 | 126 | "VPCPrivateSubnet1Subnet8BCA10E0": {
|
127 | 127 | "Type": "AWS::EC2::Subnet",
|
128 | 128 | "Properties": {
|
129 |
| - "VpcId": { |
130 |
| - "Ref": "VPCB9E5F0B4" |
131 |
| - }, |
132 | 129 | "AvailabilityZone": {
|
133 | 130 | "Fn::Select": [
|
134 | 131 | 0,
|
|
152 | 149 | "Key": "Name",
|
153 | 150 | "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1"
|
154 | 151 | }
|
155 |
| - ] |
| 152 | + ], |
| 153 | + "VpcId": { |
| 154 | + "Ref": "VPCB9E5F0B4" |
| 155 | + } |
156 | 156 | }
|
157 | 157 | },
|
158 | 158 | "VPCPrivateSubnet1RouteTableBE8A6027": {
|
159 | 159 | "Type": "AWS::EC2::RouteTable",
|
160 | 160 | "Properties": {
|
161 |
| - "VpcId": { |
162 |
| - "Ref": "VPCB9E5F0B4" |
163 |
| - }, |
164 | 161 | "Tags": [
|
165 | 162 | {
|
166 | 163 | "Key": "Name",
|
167 | 164 | "Value": "aws-cdk-codepipeline-ecs-deploy/VPC/PrivateSubnet1"
|
168 | 165 | }
|
169 |
| - ] |
| 166 | + ], |
| 167 | + "VpcId": { |
| 168 | + "Ref": "VPCB9E5F0B4" |
| 169 | + } |
170 | 170 | }
|
171 | 171 | },
|
172 | 172 | "VPCPrivateSubnet1RouteTableAssociation347902D1": {
|
|
183 | 183 | "VPCPrivateSubnet1DefaultRouteAE1D6490": {
|
184 | 184 | "Type": "AWS::EC2::Route",
|
185 | 185 | "Properties": {
|
186 |
| - "RouteTableId": { |
187 |
| - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" |
188 |
| - }, |
189 | 186 | "DestinationCidrBlock": "0.0.0.0/0",
|
190 | 187 | "NatGatewayId": {
|
191 | 188 | "Ref": "VPCPublicSubnet1NATGatewayE0556630"
|
| 189 | + }, |
| 190 | + "RouteTableId": { |
| 191 | + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" |
192 | 192 | }
|
193 | 193 | }
|
194 | 194 | },
|
|
206 | 206 | "VPCVPCGW99B986DC": {
|
207 | 207 | "Type": "AWS::EC2::VPCGatewayAttachment",
|
208 | 208 | "Properties": {
|
209 |
| - "VpcId": { |
210 |
| - "Ref": "VPCB9E5F0B4" |
211 |
| - }, |
212 | 209 | "InternetGatewayId": {
|
213 | 210 | "Ref": "VPCIGWB7E252D3"
|
| 211 | + }, |
| 212 | + "VpcId": { |
| 213 | + "Ref": "VPCB9E5F0B4" |
214 | 214 | }
|
215 | 215 | }
|
216 | 216 | },
|
|
492 | 492 | "Artifacts": {
|
493 | 493 | "Type": "CODEPIPELINE"
|
494 | 494 | },
|
| 495 | + "Cache": { |
| 496 | + "Type": "NO_CACHE" |
| 497 | + }, |
| 498 | + "EncryptionKey": "alias/aws/s3", |
495 | 499 | "Environment": {
|
496 | 500 | "ComputeType": "BUILD_GENERAL1_SMALL",
|
497 | 501 | "EnvironmentVariables": [
|
|
562 | 566 | "Source": {
|
563 | 567 | "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}",
|
564 | 568 | "Type": "CODEPIPELINE"
|
565 |
| - }, |
566 |
| - "Cache": { |
567 |
| - "Type": "NO_CACHE" |
568 |
| - }, |
569 |
| - "EncryptionKey": "alias/aws/s3" |
| 569 | + } |
570 | 570 | }
|
571 | 571 | },
|
572 | 572 | "MyPipelineRoleC0D47CA4": {
|
|
666 | 666 | "MyPipelineAED38ECF": {
|
667 | 667 | "Type": "AWS::CodePipeline::Pipeline",
|
668 | 668 | "Properties": {
|
| 669 | + "ArtifactStore": { |
| 670 | + "Location": { |
| 671 | + "Ref": "MyBucketF68F3FF0" |
| 672 | + }, |
| 673 | + "Type": "S3" |
| 674 | + }, |
669 | 675 | "RoleArn": {
|
670 | 676 | "Fn::GetAtt": [
|
671 | 677 | "MyPipelineRoleC0D47CA4",
|
|
779 | 785 | ],
|
780 | 786 | "Name": "Deploy"
|
781 | 787 | }
|
782 |
| - ], |
783 |
| - "ArtifactStore": { |
784 |
| - "Location": { |
785 |
| - "Ref": "MyBucketF68F3FF0" |
786 |
| - }, |
787 |
| - "Type": "S3" |
788 |
| - } |
| 788 | + ] |
789 | 789 | },
|
790 | 790 | "DependsOn": [
|
791 | 791 | "MyPipelineRoleDefaultPolicy34F09EFA",
|
|
1010 | 1010 | "ecs:DescribeTasks",
|
1011 | 1011 | "ecs:ListTasks",
|
1012 | 1012 | "ecs:RegisterTaskDefinition",
|
| 1013 | + "ecs:TagResource", |
1013 | 1014 | "ecs:UpdateService"
|
1014 | 1015 | ],
|
1015 | 1016 | "Effect": "Allow",
|
|
0 commit comments