@@ -2,7 +2,7 @@ tosca_definitions_version: cloudify_dsl_1_3
22
33imports :
44 - 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
66 - https://cloudify.co/spec/utilities-plugin/1.9.5/plugin.yaml
77 - https://cloudify.co/spec/fabric-plugin/1.5.1/plugin.yaml
88 - imports/manager-configuration.yaml
@@ -95,6 +95,11 @@ inputs:
9595 private_subnet_cidr :
9696 default : 10.10.5.0/24
9797
98+ resource_name :
99+ type : string
100+ description : This will be the "Name" tag on your resource.
101+ default : " Cloudify"
102+
98103dsl_definitions :
99104
100105 client_config : &client_config
@@ -164,14 +169,36 @@ node_templates:
164169 inputs :
165170 store_private_key_material : true
166171
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+
167190 vpc :
168191 type : cloudify.nodes.aws.ec2.Vpc
169192 properties :
170193 resource_config :
171194 kwargs :
172195 CidrBlock : { get_input: vpc_cidr }
173196 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
175202 internet_gateway :
176203 type : cloudify.nodes.aws.ec2.InternetGateway
177204 properties :
@@ -188,6 +215,11 @@ node_templates:
188215 CidrBlock : { get_input: public_subnet_cidr }
189216 AvailabilityZone : { get_input: availability_zone }
190217 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
191223 relationships :
192224 - type : cloudify.relationships.depends_on
193225 target : vpc
@@ -202,6 +234,11 @@ node_templates:
202234 CidrBlock : { get_input: private_subnet_cidr }
203235 AvailabilityZone : { get_input: availability_zone }
204236 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
205242 relationships :
206243 - type : cloudify.relationships.depends_on
207244 target : vpc
@@ -212,6 +249,11 @@ node_templates:
212249 type : cloudify.nodes.aws.ec2.RouteTable
213250 properties :
214251 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
215257 relationships :
216258 - type : cloudify.relationships.contained_in
217259 target : vpc
@@ -222,6 +264,11 @@ node_templates:
222264 type : cloudify.nodes.aws.ec2.RouteTable
223265 properties :
224266 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
225272 relationships :
226273 - type : cloudify.relationships.contained_in
227274 target : vpc
@@ -251,6 +298,11 @@ node_templates:
251298 kwargs :
252299 Domain : ' vpc'
253300 client_config : *client_config
301+ Tags :
302+ - Key : Name
303+ Value : { concat: [ { get_input: resource_name }, _nat_ip ] }
304+ - Key : Blueprint
305+ Value : cloudify-environment-setup
254306 interfaces :
255307 cloudify.interfaces.lifecycle :
256308 stop : {}
@@ -259,6 +311,11 @@ node_templates:
259311 type : cloudify.nodes.aws.ec2.NATGateway
260312 properties :
261313 client_config : *client_config
314+ Tags :
315+ - Key : Name
316+ Value : { concat: [ { get_input: resource_name }, _nat_gateway ] }
317+ - Key : Blueprint
318+ Value : cloudify-environment-setup
262319 relationships :
263320 - type : cloudify.relationships.depends_on
264321 target : public_subnet
@@ -288,6 +345,11 @@ node_templates:
288345 kwargs :
289346 Domain : ' vpc'
290347 client_config : *client_config
348+ Tags :
349+ - Key : Name
350+ Value : { concat: [ { get_input: resource_name }, _ip ] }
351+ - Key : Blueprint
352+ Value : cloudify-environment-setup
291353 relationships :
292354 - type : cloudify.relationships.depends_on
293355 target : nic
@@ -372,6 +434,11 @@ node_templates:
372434 Description : Created by simple-infrastructure-blueprint aws.yaml.
373435 VpcId : { get_attribute: [ vpc, aws_resource_id] }
374436 client_config : *client_config
437+ Tags :
438+ - Key : Name
439+ Value : { concat: [ { get_input: resource_name }, _sec_group ] }
440+ - Key : Blueprint
441+ Value : cloudify-environment-setup
375442 relationships :
376443 - type : cloudify.relationships.depends_on
377444 target : vpc
@@ -381,24 +448,6 @@ node_templates:
381448 inputs :
382449 resource_config : { get_property: [ SELF, resource_config, kwargs] }
383450
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-
402451 nic :
403452 type : cloudify.nodes.aws.ec2.Interface
404453 properties :
@@ -409,6 +458,11 @@ node_templates:
409458 SubnetId : { get_attribute: [ public_subnet, aws_resource_id] }
410459 Groups :
411460 - { get_attribute: [ security_group, aws_resource_id ] }
461+ Tags :
462+ - Key : Name
463+ Value : { concat: [ { get_input: resource_name }, _nic ] }
464+ - Key : Blueprint
465+ Value : cloudify-environment-setup
412466 relationships :
413467 - type : cloudify.relationships.depends_on
414468 target : public_subnet
@@ -436,6 +490,11 @@ node_templates:
436490 - Key : Name
437491 Value : Cloudify Volume
438492 client_config : *client_config
493+ Tags :
494+ - Key : Name
495+ Value : { concat: [ { get_input: resource_name }, _cloudify_host_volume ] }
496+ - Key : Blueprint
497+ Value : cloudify-environment-setup
439498
440499 cloudify_host :
441500 type : cloudify.nodes.aws.ec2.Instances
@@ -456,6 +515,11 @@ node_templates:
456515 AvailabilityZone : { get_input: availability_zone }
457516 UserData : { get_attribute: [ cloudify_host_cloud_config, cloud_config ] }
458517 client_config : *client_config
518+ Tags :
519+ - Key : Name
520+ Value : { concat: [ { get_input: resource_name }, _cloudify_host ] }
521+ - Key : Blueprint
522+ Value : cloudify-environment-setup
459523 relationships :
460524 - type : cloudify.relationships.depends_on
461525 target : cloudify_host_cloud_config
0 commit comments