|
18 | 18 | "IntegInitVpcPublicSubnet1Subnet41A6F6D4": {
|
19 | 19 | "Type": "AWS::EC2::Subnet",
|
20 | 20 | "Properties": {
|
21 |
| - "VpcId": { |
22 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
23 |
| - }, |
24 | 21 | "AvailabilityZone": {
|
25 | 22 | "Fn::Select": [
|
26 | 23 | 0,
|
|
44 | 41 | "Key": "Name",
|
45 | 42 | "Value": "integ-init/IntegInitVpc/PublicSubnet1"
|
46 | 43 | }
|
47 |
| - ] |
| 44 | + ], |
| 45 | + "VpcId": { |
| 46 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 47 | + } |
48 | 48 | }
|
49 | 49 | },
|
50 | 50 | "IntegInitVpcPublicSubnet1RouteTable837CD5FB": {
|
51 | 51 | "Type": "AWS::EC2::RouteTable",
|
52 | 52 | "Properties": {
|
53 |
| - "VpcId": { |
54 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
55 |
| - }, |
56 | 53 | "Tags": [
|
57 | 54 | {
|
58 | 55 | "Key": "Name",
|
59 | 56 | "Value": "integ-init/IntegInitVpc/PublicSubnet1"
|
60 | 57 | }
|
61 |
| - ] |
| 58 | + ], |
| 59 | + "VpcId": { |
| 60 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 61 | + } |
62 | 62 | }
|
63 | 63 | },
|
64 | 64 | "IntegInitVpcPublicSubnet1RouteTableAssociation00D33741": {
|
|
75 | 75 | "IntegInitVpcPublicSubnet1DefaultRoute5BB90E8C": {
|
76 | 76 | "Type": "AWS::EC2::Route",
|
77 | 77 | "Properties": {
|
78 |
| - "RouteTableId": { |
79 |
| - "Ref": "IntegInitVpcPublicSubnet1RouteTable837CD5FB" |
80 |
| - }, |
81 | 78 | "DestinationCidrBlock": "0.0.0.0/0",
|
82 | 79 | "GatewayId": {
|
83 | 80 | "Ref": "IntegInitVpcIGWF019AC85"
|
| 81 | + }, |
| 82 | + "RouteTableId": { |
| 83 | + "Ref": "IntegInitVpcPublicSubnet1RouteTable837CD5FB" |
84 | 84 | }
|
85 | 85 | },
|
86 | 86 | "DependsOn": [
|
|
102 | 102 | "IntegInitVpcPublicSubnet1NATGateway46F32F7F": {
|
103 | 103 | "Type": "AWS::EC2::NatGateway",
|
104 | 104 | "Properties": {
|
105 |
| - "SubnetId": { |
106 |
| - "Ref": "IntegInitVpcPublicSubnet1Subnet41A6F6D4" |
107 |
| - }, |
108 | 105 | "AllocationId": {
|
109 | 106 | "Fn::GetAtt": [
|
110 | 107 | "IntegInitVpcPublicSubnet1EIP46FCC3D6",
|
111 | 108 | "AllocationId"
|
112 | 109 | ]
|
113 | 110 | },
|
| 111 | + "SubnetId": { |
| 112 | + "Ref": "IntegInitVpcPublicSubnet1Subnet41A6F6D4" |
| 113 | + }, |
114 | 114 | "Tags": [
|
115 | 115 | {
|
116 | 116 | "Key": "Name",
|
|
126 | 126 | "IntegInitVpcPublicSubnet2Subnet9A384F16": {
|
127 | 127 | "Type": "AWS::EC2::Subnet",
|
128 | 128 | "Properties": {
|
129 |
| - "VpcId": { |
130 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
131 |
| - }, |
132 | 129 | "AvailabilityZone": {
|
133 | 130 | "Fn::Select": [
|
134 | 131 | 1,
|
|
152 | 149 | "Key": "Name",
|
153 | 150 | "Value": "integ-init/IntegInitVpc/PublicSubnet2"
|
154 | 151 | }
|
155 |
| - ] |
| 152 | + ], |
| 153 | + "VpcId": { |
| 154 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 155 | + } |
156 | 156 | }
|
157 | 157 | },
|
158 | 158 | "IntegInitVpcPublicSubnet2RouteTableF7E8F920": {
|
159 | 159 | "Type": "AWS::EC2::RouteTable",
|
160 | 160 | "Properties": {
|
161 |
| - "VpcId": { |
162 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
163 |
| - }, |
164 | 161 | "Tags": [
|
165 | 162 | {
|
166 | 163 | "Key": "Name",
|
167 | 164 | "Value": "integ-init/IntegInitVpc/PublicSubnet2"
|
168 | 165 | }
|
169 |
| - ] |
| 166 | + ], |
| 167 | + "VpcId": { |
| 168 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 169 | + } |
170 | 170 | }
|
171 | 171 | },
|
172 | 172 | "IntegInitVpcPublicSubnet2RouteTableAssociationB816F9F3": {
|
|
183 | 183 | "IntegInitVpcPublicSubnet2DefaultRoute2393995F": {
|
184 | 184 | "Type": "AWS::EC2::Route",
|
185 | 185 | "Properties": {
|
186 |
| - "RouteTableId": { |
187 |
| - "Ref": "IntegInitVpcPublicSubnet2RouteTableF7E8F920" |
188 |
| - }, |
189 | 186 | "DestinationCidrBlock": "0.0.0.0/0",
|
190 | 187 | "GatewayId": {
|
191 | 188 | "Ref": "IntegInitVpcIGWF019AC85"
|
| 189 | + }, |
| 190 | + "RouteTableId": { |
| 191 | + "Ref": "IntegInitVpcPublicSubnet2RouteTableF7E8F920" |
192 | 192 | }
|
193 | 193 | },
|
194 | 194 | "DependsOn": [
|
|
210 | 210 | "IntegInitVpcPublicSubnet2NATGateway9CCB4A9C": {
|
211 | 211 | "Type": "AWS::EC2::NatGateway",
|
212 | 212 | "Properties": {
|
213 |
| - "SubnetId": { |
214 |
| - "Ref": "IntegInitVpcPublicSubnet2Subnet9A384F16" |
215 |
| - }, |
216 | 213 | "AllocationId": {
|
217 | 214 | "Fn::GetAtt": [
|
218 | 215 | "IntegInitVpcPublicSubnet2EIP553B40DC",
|
219 | 216 | "AllocationId"
|
220 | 217 | ]
|
221 | 218 | },
|
| 219 | + "SubnetId": { |
| 220 | + "Ref": "IntegInitVpcPublicSubnet2Subnet9A384F16" |
| 221 | + }, |
222 | 222 | "Tags": [
|
223 | 223 | {
|
224 | 224 | "Key": "Name",
|
|
234 | 234 | "IntegInitVpcPrivateSubnet1Subnet259B51C1": {
|
235 | 235 | "Type": "AWS::EC2::Subnet",
|
236 | 236 | "Properties": {
|
237 |
| - "VpcId": { |
238 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
239 |
| - }, |
240 | 237 | "AvailabilityZone": {
|
241 | 238 | "Fn::Select": [
|
242 | 239 | 0,
|
|
260 | 257 | "Key": "Name",
|
261 | 258 | "Value": "integ-init/IntegInitVpc/PrivateSubnet1"
|
262 | 259 | }
|
263 |
| - ] |
| 260 | + ], |
| 261 | + "VpcId": { |
| 262 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 263 | + } |
264 | 264 | }
|
265 | 265 | },
|
266 | 266 | "IntegInitVpcPrivateSubnet1RouteTableCB37994B": {
|
267 | 267 | "Type": "AWS::EC2::RouteTable",
|
268 | 268 | "Properties": {
|
269 |
| - "VpcId": { |
270 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
271 |
| - }, |
272 | 269 | "Tags": [
|
273 | 270 | {
|
274 | 271 | "Key": "Name",
|
275 | 272 | "Value": "integ-init/IntegInitVpc/PrivateSubnet1"
|
276 | 273 | }
|
277 |
| - ] |
| 274 | + ], |
| 275 | + "VpcId": { |
| 276 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 277 | + } |
278 | 278 | }
|
279 | 279 | },
|
280 | 280 | "IntegInitVpcPrivateSubnet1RouteTableAssociation067DEF9D": {
|
|
291 | 291 | "IntegInitVpcPrivateSubnet1DefaultRoute654ACECF": {
|
292 | 292 | "Type": "AWS::EC2::Route",
|
293 | 293 | "Properties": {
|
294 |
| - "RouteTableId": { |
295 |
| - "Ref": "IntegInitVpcPrivateSubnet1RouteTableCB37994B" |
296 |
| - }, |
297 | 294 | "DestinationCidrBlock": "0.0.0.0/0",
|
298 | 295 | "NatGatewayId": {
|
299 | 296 | "Ref": "IntegInitVpcPublicSubnet1NATGateway46F32F7F"
|
| 297 | + }, |
| 298 | + "RouteTableId": { |
| 299 | + "Ref": "IntegInitVpcPrivateSubnet1RouteTableCB37994B" |
300 | 300 | }
|
301 | 301 | }
|
302 | 302 | },
|
303 | 303 | "IntegInitVpcPrivateSubnet2Subnet1643B059": {
|
304 | 304 | "Type": "AWS::EC2::Subnet",
|
305 | 305 | "Properties": {
|
306 |
| - "VpcId": { |
307 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
308 |
| - }, |
309 | 306 | "AvailabilityZone": {
|
310 | 307 | "Fn::Select": [
|
311 | 308 | 1,
|
|
329 | 326 | "Key": "Name",
|
330 | 327 | "Value": "integ-init/IntegInitVpc/PrivateSubnet2"
|
331 | 328 | }
|
332 |
| - ] |
| 329 | + ], |
| 330 | + "VpcId": { |
| 331 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 332 | + } |
333 | 333 | }
|
334 | 334 | },
|
335 | 335 | "IntegInitVpcPrivateSubnet2RouteTable030EC93B": {
|
336 | 336 | "Type": "AWS::EC2::RouteTable",
|
337 | 337 | "Properties": {
|
338 |
| - "VpcId": { |
339 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
340 |
| - }, |
341 | 338 | "Tags": [
|
342 | 339 | {
|
343 | 340 | "Key": "Name",
|
344 | 341 | "Value": "integ-init/IntegInitVpc/PrivateSubnet2"
|
345 | 342 | }
|
346 |
| - ] |
| 343 | + ], |
| 344 | + "VpcId": { |
| 345 | + "Ref": "IntegInitVpc0D4FCCB3" |
| 346 | + } |
347 | 347 | }
|
348 | 348 | },
|
349 | 349 | "IntegInitVpcPrivateSubnet2RouteTableAssociation6B52BD72": {
|
|
360 | 360 | "IntegInitVpcPrivateSubnet2DefaultRoute6A10B6EA": {
|
361 | 361 | "Type": "AWS::EC2::Route",
|
362 | 362 | "Properties": {
|
363 |
| - "RouteTableId": { |
364 |
| - "Ref": "IntegInitVpcPrivateSubnet2RouteTable030EC93B" |
365 |
| - }, |
366 | 363 | "DestinationCidrBlock": "0.0.0.0/0",
|
367 | 364 | "NatGatewayId": {
|
368 | 365 | "Ref": "IntegInitVpcPublicSubnet2NATGateway9CCB4A9C"
|
| 366 | + }, |
| 367 | + "RouteTableId": { |
| 368 | + "Ref": "IntegInitVpcPrivateSubnet2RouteTable030EC93B" |
369 | 369 | }
|
370 | 370 | }
|
371 | 371 | },
|
|
383 | 383 | "IntegInitVpcVPCGW85EDC292": {
|
384 | 384 | "Type": "AWS::EC2::VPCGatewayAttachment",
|
385 | 385 | "Properties": {
|
386 |
| - "VpcId": { |
387 |
| - "Ref": "IntegInitVpc0D4FCCB3" |
388 |
| - }, |
389 | 386 | "InternetGatewayId": {
|
390 | 387 | "Ref": "IntegInitVpcIGWF019AC85"
|
| 388 | + }, |
| 389 | + "VpcId": { |
| 390 | + "Ref": "IntegInitVpc0D4FCCB3" |
391 | 391 | }
|
392 | 392 | }
|
393 | 393 | },
|
|
513 | 513 | ]
|
514 | 514 | }
|
515 | 515 | },
|
516 |
| - "Instance255F35265a0c5f577d761edb0": { |
| 516 | + "Instance255F3526574cbd507dfce8b71": { |
517 | 517 | "Type": "AWS::EC2::Instance",
|
518 | 518 | "Properties": {
|
519 | 519 | "AvailabilityZone": {
|
|
553 | 553 | "Fn::Join": [
|
554 | 554 | "",
|
555 | 555 | [
|
556 |
| - "#!/bin/bash\n# fingerprint: 89cb2e09a1c3d4c8\n(\n set +e\n /opt/aws/bin/cfn-init -v --region ", |
| 556 | + "#!/bin/bash\n# fingerprint: 4f2827c68bde31b4\n(\n set +e\n /opt/aws/bin/cfn-init -v --region ", |
557 | 557 | {
|
558 | 558 | "Ref": "AWS::Region"
|
559 | 559 | },
|
560 | 560 | " --stack ",
|
561 | 561 | {
|
562 | 562 | "Ref": "AWS::StackName"
|
563 | 563 | },
|
564 |
| - " --resource Instance255F35265a0c5f577d761edb0 -c default\n /opt/aws/bin/cfn-signal -e $? --region ", |
| 564 | + " --resource Instance255F3526574cbd507dfce8b71 -c default\n /opt/aws/bin/cfn-signal -e $? --region ", |
565 | 565 | {
|
566 | 566 | "Ref": "AWS::Region"
|
567 | 567 | },
|
568 | 568 | " --stack ",
|
569 | 569 | {
|
570 | 570 | "Ref": "AWS::StackName"
|
571 | 571 | },
|
572 |
| - " --resource Instance255F35265a0c5f577d761edb0\n cat /var/log/cfn-init.log >&2\n)" |
| 572 | + " --resource Instance255F3526574cbd507dfce8b71\n cat /var/log/cfn-init.log >&2\n)" |
573 | 573 | ]
|
574 | 574 | ]
|
575 | 575 | }
|
|
641 | 641 | "group": "root"
|
642 | 642 | }
|
643 | 643 | }
|
| 644 | + }, |
| 645 | + "service": { |
| 646 | + "files": { |
| 647 | + "/myvars.env": { |
| 648 | + "content": "OTHER_VAR=\"im from the file :3\"", |
| 649 | + "encoding": "plain", |
| 650 | + "mode": "000644", |
| 651 | + "owner": "root", |
| 652 | + "group": "root" |
| 653 | + }, |
| 654 | + "/etc/systemd/system/myapp.service": { |
| 655 | + "content": "[Unit]\nAfter=network.target\n[Service]\nExecStart=/bin/bash -c \"echo HELLO_WORLD=${MY_VAR} | FROM_FILE=${OTHER_VAR}\"\nRestart=always\nEnvironmentFile=/myvars.env\nEnvironment=\"MY_VAR=its me :)\"\n[Install]\nWantedBy=multi-user.target", |
| 656 | + "encoding": "plain", |
| 657 | + "mode": "000644", |
| 658 | + "owner": "root", |
| 659 | + "group": "root" |
| 660 | + } |
| 661 | + } |
644 | 662 | }
|
645 | 663 | },
|
646 | 664 | "AWS::CloudFormation::Authentication": {
|
|
0 commit comments