Concepts
There are a few key concepts to understand when working with CBLE blueprints:
Resources
A resource represents something which could be deployed in the cloud. This might be a server, a database, a load balancer, a router, anything you can deploy in the cloud (with provider support).
Let's use this resource as an example:
host1:
resource: openstack.v1.host
config:
hostname: host1
image: UbuntuJammy2204
flavor: medium
disk_size: 10
networks:
network1:
dhcp: false
ip: 10.10.0.1
depends_on:
- router1
There is a lot to unpack here, but let's unpack line-by-line:
host1:
- This represents a unique key which can be used to reference this resource elsewhere in the blueprintresource: openstack.v1.host
- Defines the type of resources this reference represents (in this case a host on OpenStack)config:
- This entire block is going to be unique to each provider used. Values here are used by the provider to deploy/configure the intended resourcedepends_on
- This is a list of other resource references (like line 1) on which this resource depends. This resource will not be deployed until alldepends_on
resources are successful. This resource will be destroyed before anydepends_on
resources are destroyed
For more information on resource configs for a provider, please refer to the provider's documentation.
Data Source
A data source represents something which is already deployed in the cloud. This might be a server, a database, a load balancer, a router, anything you can deploy in the cloud (with provider support).
Let's use this data source as an example:
While this looks similar to a resource, instead of using the config
block to deploy and configure a resource, the provider
will look up an existing resource in the attached cloud environment which matches this config.