githubEdit

Node

Overview

The node is the graphical object you use to build your cloud infrastructure and is the building block of the architecture.

circle-check

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.

  1. Azure example

When you add an AKS cluster to the resource group, it automatically inherits the resource_group_name from the RG.

  1. AWS example

When you add an internet gateway to the VPC, it inherits the vpc_id automatically from the VPC.

  1. GCP example: When you add compute firewall into a compute network, it inherits its network automatically

circle-info

Brainboard group

  • This is a special container of resources that has a title and icon that you can customize.

  • It supports nested containers.

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

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

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

  1. Order: Change the z-index of the node.

#
Oorder

a

Send backwards

b

Send to back

c

Bring to front

d

Bring forward

#
Oorder

a

Send backwards

b

Send to back

c

Bring to front

d

Bring forward

  1. Align: This option allows you to align multiple nodes. You must select all the nodes that you need to align.

#
Alignment

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

  1. Change the background colour of the node.

  2. Change the text colour of the node.

  3. Change the border colour of the node.

  4. Change the border radius of the node.

  5. Make the borders of the node dashed.

  6. Change the border weight of the node.

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

  1. Resource, data source and container

These 3 types of nodes share the same options in their context menu.

#
Menu item

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.

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

circle-info

Refer to the Resource Configuration 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 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.

  1. A node can be selected when you click on its Terraform code in the right pane.

  2. Nodes can be linked to each other automatically when you reference a Terraform attribute from one node to another.

circle-info

The name of the field that references the other node is put in the text of the connector created between both resources.

  1. Containers can pass their cloud properties to their children when Terraform supports it.

circle-info

Brainboard can detect what should be passed and how, and then generate the right code.

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

  2. A container cannot be resized smaller than its children. It has to visually indicate the children contained.

  3. There is no inheritance between resources of different providers.

circle-info

For example, you cannot add an aws_subnet inside azurerm_virtual_network.

  1. Within the same provider, you cannot do what is not allowed by the provider.

circle-info

For example, you cannot add a subnet inside a subnet, VPC inside VPC, VNET inside VNET...

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

circle-info

For example, if you try to add a VPC inside a subnet, Brainboard will put the subnet inside the VPC and fill the information correctly for you.

  1. You can still reference resources from different providers in the Resource Configuration panel.

circle-info

For example, reference an AD user inside a VM.

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