This topic describes the steps to create a terraform based HyperCloud™ Blueprint. A simple terraform template consists of 2 files at minimum:
- Main.tf – This file has syntax for configuration of cloud resources
- Variables.tf – This file consists of parameter definition which feed values into the main.tf when terraform processes the blueprints
Before deploying a Terraform Blueprints, the following must be configured
- Backend State - Provisioning Terraform requires a backend state configured via HyperCloud™ Platform. Backend state in terraform preserve the current state of the deployment.
Note: If the backend state has no state saved previously, terraform plan will provide information objects which will be created. Otherwise, the terraform output will show update and delete tasks too which means existing resources will change if ignored.
- Workspace – Workspace consists of terraform configuration which is associated with a backend state that defines how operations are executed and where persistent data such as the Terraform state are stored. Multiple workspaces can use same backend state.
Terraform Blueprints deployment includes the following steps
- Validate – Validates terraform files for syntax errors
- Plan - Creates a plan of execution and displays information on changes that will occur.
- Terraform Apply – Terraform templates will be applied, and resources will be configured in the cloud Provider