Depending on the operating system, terraform can be installed in different ways. Please follow Hashicorp's installation documentation for in-depth installation for all OS. Once Terraform has been installed, Terraform will need to access the cloud provider's credential create, modify, and destroy resources within the account.
Setup Terraform Environment
During this setup process, the cloud provider CLI will need to be installed in order to gain access safely to your account. This guide will provide instruction on how to setup SSO to each cloud provider so Terraform has access to the account without exporting an sensitive information hard coded within the environment.
After install AWS CLI, enter the command terminal and input
aws configure sso --profile PROFILE_NAME that will ask the following prompts:
1. SSO start URL (https://aggie-innovation-platform.awsapps.com/start#/)
2. SSO Region (us-east-2)
3. Redirect to a SSO Authorization page to allow access
4. Select an available account
5. Select an IAM role
After successfully configuring the SSO, it will created a configure file in the directory
After installing Azure CLI, enter the following command in the terminal
az login. This will grant access to the account locally in the environment for Terraform. Once you have logged in, it will output information about the account that was logged on:
id or the subscription id and enter
az account set --subscription "35akss-subscription-id" to set the account with Azure CLI. This will complete the setup to grant account access to Terraform.