Terraform contd
Configuring Terraform to use a specific cloud account
- AWS:
- Install AWS CLI
- configure AWS CLI
- Terraform aws provider by default uses AWS CLI credential configuration
AWS and Azure CLI Configuration
- Watch the classroom video for screens
-
Azure:
- Install Azure CLI
- Configure Azure CLI to connect to your account
- Terraform azurerm provider by default uses Azure CLI credential configuration
Hello Terraform AWS
- Create a new folder and create any file with extension
.tf - Refer Here for the provider documentation and Refer Here for arguments
- Providers are not part of terraform installation. To download the provider into your local system
cd <folder>
terraform init
- Refer Here for changes done to add aws provider
Hello Terraform Azure
- Create a new folder and create any file with extension
.tf - Refer Here for arguments that can be used in provider block
- Refer Here for the changes done
- Providers are not part of terraform installation. To download the provider into your local system
cd <folder>
terraform init
- Lets create a resource group in Azure. For manual steps watch classroom recording
- To implement in terraform
- search for resource in documentation
- google search for resource
- search for resource in documentation
- Resource in Terraform Refer Here
resource "<type>" "<internal-name>" {
}
- After adding resource, execute validate and fmt
- Refer Here for the changes done
- Now apply the changes
