Azure Marketplace Terraform Solution Template
This template provisions a Linux Virtual Machine(VM) to Azure pre-configured with the Terraform v0.11.1 core runtime and the Azure CLI v2.0.
Template Deployment Steps:
- Creates a VM with system assigned identity based on the
Ubuntu 16.04 LTSimage - Installs the
MSIextension on the VM to allow OAuth tokens to be issued forAzureresources - Assign
RBACpermissions to the Managed Identity, granting owner rights for the resource group - Creates a
Terraformtemplate folder (tfTemplate) - Pre-configures
Terraformremote state with theAzurebackend
Once all required resources have been provisioned to Azure the template will then execute a shell script on the VM using the custom script extension. The shell script will install Terraform v0.11.1 core runtime and the Azure CLI v2.0. It then creates a Terraform template folder that is pre-configured to use Terraform Remote State with the Azure backend. The Azure CLI will also create the storage container required by remote state.
Post Deployment Configuration Steps
Steps to Enable Remote State
Copy ~/tfTemplate/remoteState.tf from home directory to the root of the Terraform scripts to enable remote state management.
Steps to Enable MSI
Once the template has finished deployment, log into the VM via SSH and run the following command to enable MSI with Terraform.
sh ~/tfEnv.sh