Node
Description
The node is the graphical object you use to build your cloud infrastructure and is the building block of the architecture.
When you drag and drop a node from the left bar and add it to the design area, you can customize both its graphical aspects and its cloud configuration to generate its Terraform code.
Types of nodes
Resource: It represents a cloud resource for a given provider for which Brainboard generates the
resource
Terraform block.Data source: This is a read only object that you allows you to reference an existing cloud resource. Brainboard generates the
data
Terraform block for it.The data block is indicated with a cube on its left:
Icon only: This object is used to depict a graphical component that doesn't have a Terraform code, but has a meaning in the architecture.
Container: This node is supposed to contain other resources and pass some of its cloud or graphical configurations to its children.
Azure example: When you add an AKS cluster into the resource group, it automatically inherits the
resource_group_name
from the RGAWS example: When you add an internet gateway to the VPC, it inherits the
vpc_id
automatically from the VPC.GCP example: When you add compute firewall into a compute network, it inherits its
network
automatically
Module: This node represents a Terraform module for which Brainboard generates a
module
block.By default, when you can a module, it is represented by a simple node containing the icon of the provider of the resources
You can change any module into a container, by right-clicking on it and select
Switch to container.
You can turn it back into a node by right click and selectSwitch to node
.
Shape: This is a pure graphical object that helps you depict information that don't have a Terraform code.
Some shapes can also be containers, like rectangles and circles, which helps you group your resources without triggering cloud configuration inheritance.
Text: This node helps create a text object to add complementary information to your cloud architecture.
Graphical options
Options bar
The following graphical options are common to any node in the design area:
Lock the node: This allows you to lock/unlock the node graphically, which means it cannot be moved, resized, deleted or modified.
Duplicate the node
Order: Change the z-index of the node
Send backwards
Send to back
Bring to front
Bring forward
Align: This option allows you to align multiple nodes
Align nodes left
Align vertically nodes' centers
Align nodes right
Align nodes to the top
Align horizontally nodes' centers
Align nodes on the bottom
Distribute space between nodes vertically
Distribute space between nodes horizontally
Change the background color of the node
Change the text color of the node
Change the borders color of the node
Change the border radius of the node
Make borders of the node dashed
Change the border weight of the node
Open cloud configuration: This will open the ID card of the resource that contains all Terraform fields that you can fill. Brainboard generates the Terraform code based on this configuration.
Context menu
Resource, data source and container: These 3 types of nodes share the same options of their context menu:
Open the ID card of the resource to update the cloud configuration
Change the title of the node
Add connectors
Disable the Terraform code generation of the node without deleting it from the design
You can enable the code back by right-clicking on the resource and chose the option
Add to code
Put the node into a different Terraform file
Switch the resource into data and vice versa
Delete the node from the design and the generated code
Module: All the options are similar to the resource, except that for modules, you have the possibility to swatch a module visually into a container and switch it back into a normal node if needed.
Cloud configuration
Every node that is a cloud resource will have its Terraform code automatically generated and updated when you fill the information in the ID card or when you move the node into a parent, where it inherits some cloud properties.
Refer to ID card page for more details about how to update the cloud configuration of nodes and all the options available.
Behavior
Brainboard design area is a smart canvas that has a cloud knowledge and is able to understand the relationship and links between resources.
Here is the behavior of the node in the design area:
A node can be selected when you click on its Terraform code in the right pane.
Nodes can be linked to each other automatically when you reference a Terraform attribute from a node to another.
The name of the field that references the other node is put in the text of the connector created between both resources.
Containers can pass their cloud properties into their children when Terraform supports it.
Brainboard can detect what should be passed and how, and then generates the right code.
When you update the
resource name
of any node at any level, Brainboard automatically updates all the nodes that depend on it with the new name.Container cannot be resized smaller than its children. It has to visually indicate the children contained.
There is no inheritance between resources of different providers.
For example, you cannot add an
aws_subnet
insideazurerm_virtual_network
.
Within the same provider, you cannot do what is not allowed by the provider.
For example, you cannot add a subnet inside a subnet, VPC inside VPC, VNET inside VNET...
When you try to add a container into another one, Brainboard automatically fixes the right order of containers based on what is accepted by the provider.
For example, if you try to add a VPC inside a subnet, Brainboard will put the subnet inside the VPC and fills the information correctly for you.
You can still reference resources from different providers in the ID card.
For example, reference AD user inside a VM.
When selecting multiple resources and cloning them, Brainboard automatically generates new resource names to avoid collisions and tracks dependencies correctly. Which means, the Terraform plan should pass after the clone.
Last updated