How does Cubtera work?
β Cubtera is a tool for managing IaC units with different dimensions from single inventory. It allows you to separate your infrastructure by different dimensions, and manage it with single inventory without code duplication (DRY).
β Each unit is a separate bunch of code for chosen type of runner, such as terraform or bash script, which could be applied with defined set of dimensions. Dedicated dimension is a set of values, which could be used for infrastructure separation by different environments, regions, accounts, etc.
β For example, you have a unit aws_network_vpc
which is creating vpc network for your infrastructure, and you want to use it for different environments, like staging and production. You can create dimension, dc
(data center), and inside this dimension folder create two files staging.json
and production.json
with the same set of variables, but with different values.
β
βAnd use this dimension to create vpc network for your staging and production environments, with the same terraform unit, but with different values for variables.
β Your vpc network will be created in production environment with values from production.json
file. Defined values will be provided to terraform unit as variables:
var.dim_dc_meta
- object fromproduction.json
filevar.dim_dc_name
- stringproduction
β Cubtera takes responsibility for providing these variables to your terraform unit, and you can use them in your terraform code as any other variables.