Node
Overview
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 panel into the design area, you can customize both its graphical aspects and its cloud configuration to generate its Terraform code.
Types of nodes
1. Resource
It represents a cloud resource for a given provider for which Brainboard generates the resource Terraform block.

2. Data source
This is a read-only object that 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.

3. 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.

4. 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 to the resource group, it automatically inherits the resource_group_name from the RG.

AWS 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
networkautomatically

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 select Switch 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.

Order: Change the z-index of the node.

a
Send backwards
b
Send to back
c
Bring to front
d
Bring forward
a
Send backwards
b
Send to back
c
Bring to front
d
Bring forward
Align: This option allows you to align multiple nodes. You must select all the nodes that you need to align.

a
Align nodes left
b
Align vertically nodes' centers
c
Align nodes right
d
Align nodes to the top
e
Align horizontally nodes' centers
f
Align nodes on the bottom
g
Distribute space between nodes vertically
h
Distribute space between nodes horizontally
i
Tidy up nodes
Change the background colour of the node.
Change the text colour of the node.
Change the border colour of the node.
Change the border radius of the node.
Make the borders of the node dashed.
Change the border weight of the node.
Open cloud configuration: This will open the Resource Configuration panel 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 in their context menu.

a
Open the Resource Configuration panel to update the cloud configuration.
b
Switch the resource into data and vice versa.
c
Change the title of the node.
d
This allows you to lock/unlock the node graphically, which means it cannot be moved, resized, deleted or modified.
e
❓❓
f
Duplicate the node.
g
❓❓
h
Disable the Terraform code generation of the node without deleting it from the design
You can enable the code by right-clicking on the resource and choosing the option Add to code
i
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 switch 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 in the information in the Resource Configuration panel or when you move the node into a parent, where it inherits some cloud properties.
Behavior
Brainboard design area is a smart canvas that has cloud knowledge and is able to understand the relationships and links between resources.
Explained below is the behaviour 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 one node to another.
Containers can pass their cloud properties to their children when Terraform supports it.
When you update the
resource nameof any node at any level, Brainboard automatically updates all the nodes that depend on it with the new name.A 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.
Within the same provider, you cannot do what is not allowed by the provider.
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.
You can still reference resources from different providers in the Resource Configuration panel.
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
