Before you add a Terraform configuration to an Automation Assembler template, set up and integrate your version control repository.
Prerequisites
For the VMware Aria Automation on-premises product to run Terraform operations, you need the Terraform runtime integration. See Preparing an Automation Assembler Terraform runtime environment.
Store Terraform configuration files in a version control repository
Automation Assembler supports the following version control repositories for Terraform configurations.
- GitHub cloud, GitHub Enterprise on-premises
- GitLab cloud, GitLab Enterprise on-premises
- Bitbucket on-premises
In your version control repository, create a default directory with one layer of subdirectories, each with Terraform configuration files. Create one subdirectory per Terraform configuration.
- Default directory
- Single subdirectory layer
- Deployment-ready Terraform configuration files
Don't include a Terraform state file with configuration files. If
terraform.tfstate
is present, errors occur during deployment.
![Repository directory structure](images/GUID-E7288A2D-8ECD-4D26-92BD-AC6C8CFE3433-low.png)
Enable cloud zone mapping
If you expect to deploy to a cloud account, the Terraform runtime engine needs those cloud zone credentials.
In the project Provisioning tab, enable Allow Terraform cloud zone mapping.
![Terraform cloud zone mapping enabled](images/GUID-FE70E0C6-ECDE-489F-A4BD-423B1253569A-low.png)
Even though credentials are securely transmitted, for additional security, you should leave the option deactivated if project users don't need to deploy to a cloud account.
Integrate your repository with Automation Assembler
In Automation Assembler, go to .
Add an integration to the repository offering type where you stored the Terraform configurations: GitHub, GitLab, or Bitbucket.
When you add your project to the integration, select the Terraform Configurations type, and identify the repository and branch.
Folder is the default directory of your earlier structure.
![Terraform repository integration](images/GUID-F6202481-5BE6-4F98-A47A-A1047F231377-low.png)