Cloud resource is any resource available at the cloud provider that has either a Terraform resource or data source associated with it.
- This resource can be drag & dropped from the left bar.
- Every cloud resource has a set of configuration parameters that you can customize in the ID card of that resource.
- There are 5 types of nodes:
- Cloud resource: this resource will be created when you provision the infrastructure.
- Data source: it refers an existing cloud resource.
- Module: Terraform module.
- Container: it can contain other resource and give them its properties. For e.g. AWS VPC, or Azure virtual network.
- Icon only: this resource is just graphic and has no Terraform representation.
- Refer to the identity card page for more information on how to configure resources.
Type of resources
Brainboard supports all the supported types by Terraform. You have the possibility to switch between the 2 types of resource from the switch in the left bar.
|Resource button||Data sources button|
They represent resources available at the Terraform provider for a specific version.
As per Terraform definition: Data sources allow Terraform to use information defined outside of Terraform, defined by another separate Terraform configuration, or modified by functions.
They are used in architecture to reference and/or get information about a resource already deployed. Data resources could be:
- A common resource shared between multiple architectures.
- For security reason (read-only access) resources.
- Managed by another team.
Nodes like Text, or generic icons have no cloud configuration and will not be deployed into the target cloud provider.
- You can convert any cloud resource into an icon, so its code will be removed from the generated one.
- You can put it back into cloud resource, its configuration will be preserved.
- You also have the possibility to hide the code of any cloud resource from the generated code by click in the hide icon of the id-card
- You can change/customize the icon of any resource to reflect your preferences.
Supported cloud providers
Refer to the page supported cloud providers for more details.
Interactions between nodes
When you drag-&-drop any resource, for any cloud provider, the id-card of this resource will be open to allow you configure its cloud parameters. Brainboard generates the Terraform code instantly when you close the id-card.
There is a special type of resources called
containers, which means you can drop resources inside them, Brainboard detects the relationship between them and automatically the added resource and populate the information in the right direction.
- AWS VPC & subnet: when you add a subnet inside the VPC, Brainboard detects the relationship between them and automatically add VPC information in the subnet resources.
- Azure Virtual Network & subnet: when you add subnet inside a vnet, Brainboard automatically detects their relationship and update the code accordingly.
- GCP network & subnetwork: when you a subnetwork inside a network, Brainboard understands it and populate the inherited information automtically.
- Brainboard detects which exported attribute is needed and automatically add it in the resource. You don't need to do it automatically.
- In the examples above, it detected that the
.idis needed for AWS VPC and
.nameis needed for Azure vnet.
- In the examples above, it detected that the
- Brainboard has the knowledge of the cloud provider of every resources and allows only actions allowed by the cloud provider.
- For e.g. you cannot add AWS resource inside Azure container
- Within the same provider, Brainboard can understand what is allowed or not.
- For e.g. you cannot add a region inside a region, VPC inside a VPC, vnet inside vnet....
- When you change the
resource nameof any resource, Brainboard automatically update all resources that reference it with the new value.
Links between nodes aka Connectors
The connector links two components together and can exist in 2 forms:
- Automatically added: this connector is added when you use a specific property of one node into the configuration of another one:
In this example, Azure firewall uses in its public IP parameter the exported attribute
IDof the resource public IP. Brainboard automatically generated this connect when the configuration is updated.
- Manually added: This type of connectors have no equivalent cloud configuration and it is just a graphical representation of the link that may exist outside of Terraform.
When you add a resource into the design area, Brainboard generates its Terraform code instantly and automatically and highlight it in the embedded VSCode editor.
When you click on any resource, Brainboard highlights it in the code and vice-versa, when you click on the name of the resource in the code, Brainboard automatically selects the resource and open its configuration menu.
- Always start by adding containers first into the design, this way Brainboard will detect automatically any resource you insert inside them whatever the number of layers.
- If you want to stay compliant with Terraform, always put the Terraform resource name you choose as a text of the resource as well.
- Use the native auto-inheritance mechanism of Brainboard when you add resources. It saves you a lot of time.