@@ -2,7 +2,7 @@ tosca_definitions_version: cloudify_dsl_1_3
2
2
3
3
imports :
4
4
- https://cloudify.co/spec/cloudify/4.5/types.yaml
5
- - https://cloudify.co/spec/awssdk-plugin/2.6 .0/plugin.yaml
5
+ - https://cloudify.co/spec/awssdk-plugin/2.7 .0/plugin.yaml
6
6
- https://cloudify.co/spec/utilities-plugin/1.9.5/plugin.yaml
7
7
- https://cloudify.co/spec/fabric-plugin/1.5.1/plugin.yaml
8
8
- imports/manager-configuration.yaml
@@ -95,6 +95,11 @@ inputs:
95
95
private_subnet_cidr :
96
96
default : 10.10.5.0/24
97
97
98
+ resource_name :
99
+ type : string
100
+ description : This will be the "Name" tag on your resource.
101
+ default : " Cloudify"
102
+
98
103
dsl_definitions :
99
104
100
105
client_config : &client_config
@@ -164,14 +169,36 @@ node_templates:
164
169
inputs :
165
170
store_private_key_material : true
166
171
172
+ cloudify_host_cloud_config :
173
+ type : cloudify.nodes.CloudInit.CloudConfig
174
+ interfaces :
175
+ cloudify.interfaces.lifecycle :
176
+ create :
177
+ inputs :
178
+ resource_config :
179
+ users :
180
+ - name : { get_input: cloudify_image_username }
181
+ primary-group : wheel
182
+ shell : /bin/bash
183
+ sudo : ['ALL=(ALL) NOPASSWD:ALL']
184
+ ssh-authorized-keys :
185
+ - { get_attribute: [ manager_key, public_key_export ] }
186
+ relationships :
187
+ - type : cloudify.relationships.depends_on
188
+ target : manager_key
189
+
167
190
vpc :
168
191
type : cloudify.nodes.aws.ec2.Vpc
169
192
properties :
170
193
resource_config :
171
194
kwargs :
172
195
CidrBlock : { get_input: vpc_cidr }
173
196
client_config : *client_config
174
-
197
+ Tags :
198
+ - Key : Name
199
+ Value : { concat: [ { get_input: resource_name }, _vpc ] }
200
+ - Key : Blueprint
201
+ Value : cloudify-environment-setup
175
202
internet_gateway :
176
203
type : cloudify.nodes.aws.ec2.InternetGateway
177
204
properties :
@@ -188,6 +215,11 @@ node_templates:
188
215
CidrBlock : { get_input: public_subnet_cidr }
189
216
AvailabilityZone : { get_input: availability_zone }
190
217
client_config : *client_config
218
+ Tags :
219
+ - Key : Name
220
+ Value : { concat: [ { get_input: resource_name }, _public_subnet ] }
221
+ - Key : Blueprint
222
+ Value : cloudify-environment-setup
191
223
relationships :
192
224
- type : cloudify.relationships.depends_on
193
225
target : vpc
@@ -202,6 +234,11 @@ node_templates:
202
234
CidrBlock : { get_input: private_subnet_cidr }
203
235
AvailabilityZone : { get_input: availability_zone }
204
236
client_config : *client_config
237
+ Tags :
238
+ - Key : Name
239
+ Value : { concat: [ { get_input: resource_name }, _private_subnet ] }
240
+ - Key : Blueprint
241
+ Value : cloudify-environment-setup
205
242
relationships :
206
243
- type : cloudify.relationships.depends_on
207
244
target : vpc
@@ -212,6 +249,11 @@ node_templates:
212
249
type : cloudify.nodes.aws.ec2.RouteTable
213
250
properties :
214
251
client_config : *client_config
252
+ Tags :
253
+ - Key : Name
254
+ Value : { concat: [ { get_input: resource_name }, _public_subnet_routetable ] }
255
+ - Key : Blueprint
256
+ Value : cloudify-environment-setup
215
257
relationships :
216
258
- type : cloudify.relationships.contained_in
217
259
target : vpc
@@ -222,6 +264,11 @@ node_templates:
222
264
type : cloudify.nodes.aws.ec2.RouteTable
223
265
properties :
224
266
client_config : *client_config
267
+ Tags :
268
+ - Key : Name
269
+ Value : { concat: [ { get_input: resource_name }, _private_subnet_routetable ] }
270
+ - Key : Blueprint
271
+ Value : cloudify-environment-setup
225
272
relationships :
226
273
- type : cloudify.relationships.contained_in
227
274
target : vpc
@@ -259,6 +306,11 @@ node_templates:
259
306
type : cloudify.nodes.aws.ec2.NATGateway
260
307
properties :
261
308
client_config : *client_config
309
+ Tags :
310
+ - Key : Name
311
+ Value : { concat: [ { get_input: resource_name }, _nat_gateway ] }
312
+ - Key : Blueprint
313
+ Value : cloudify-environment-setup
262
314
relationships :
263
315
- type : cloudify.relationships.depends_on
264
316
target : public_subnet
@@ -372,6 +424,11 @@ node_templates:
372
424
Description : Created by simple-infrastructure-blueprint aws.yaml.
373
425
VpcId : { get_attribute: [ vpc, aws_resource_id] }
374
426
client_config : *client_config
427
+ Tags :
428
+ - Key : Name
429
+ Value : { concat: [ { get_input: resource_name }, _sec_group ] }
430
+ - Key : Blueprint
431
+ Value : cloudify-environment-setup
375
432
relationships :
376
433
- type : cloudify.relationships.depends_on
377
434
target : vpc
@@ -381,24 +438,6 @@ node_templates:
381
438
inputs :
382
439
resource_config : { get_property: [ SELF, resource_config, kwargs] }
383
440
384
- cloudify_host_cloud_config :
385
- type : cloudify.nodes.CloudInit.CloudConfig
386
- interfaces :
387
- cloudify.interfaces.lifecycle :
388
- create :
389
- inputs :
390
- resource_config :
391
- users :
392
- - name : { get_input: cloudify_image_username }
393
- primary-group : wheel
394
- shell : /bin/bash
395
- sudo : ['ALL=(ALL) NOPASSWD:ALL']
396
- ssh-authorized-keys :
397
- - { get_attribute: [ manager_key, public_key_export ] }
398
- relationships :
399
- - type : cloudify.relationships.depends_on
400
- target : manager_key
401
-
402
441
nic :
403
442
type : cloudify.nodes.aws.ec2.Interface
404
443
properties :
@@ -409,6 +448,11 @@ node_templates:
409
448
SubnetId : { get_attribute: [ public_subnet, aws_resource_id] }
410
449
Groups :
411
450
- { get_attribute: [ security_group, aws_resource_id ] }
451
+ Tags :
452
+ - Key : Name
453
+ Value : { concat: [ { get_input: resource_name }, _nic ] }
454
+ - Key : Blueprint
455
+ Value : cloudify-environment-setup
412
456
relationships :
413
457
- type : cloudify.relationships.depends_on
414
458
target : public_subnet
@@ -436,6 +480,11 @@ node_templates:
436
480
- Key : Name
437
481
Value : Cloudify Volume
438
482
client_config : *client_config
483
+ Tags :
484
+ - Key : Name
485
+ Value : { concat: [ { get_input: resource_name }, _cloudify_host_volume ] }
486
+ - Key : Blueprint
487
+ Value : cloudify-environment-setup
439
488
440
489
cloudify_host :
441
490
type : cloudify.nodes.aws.ec2.Instances
@@ -456,6 +505,11 @@ node_templates:
456
505
AvailabilityZone : { get_input: availability_zone }
457
506
UserData : { get_attribute: [ cloudify_host_cloud_config, cloud_config ] }
458
507
client_config : *client_config
508
+ Tags :
509
+ - Key : Name
510
+ Value : { concat: [ { get_input: resource_name }, _cloudify_host ] }
511
+ - Key : Blueprint
512
+ Value : cloudify-environment-setup
459
513
relationships :
460
514
- type : cloudify.relationships.depends_on
461
515
target : cloudify_host_cloud_config
0 commit comments