Skip to content

roberto-mardeni/terraform-on-azure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-on-azure

Demonstrates using Terraform on Azure using basic concepts like variables, functions, third party modules and custom modules

Prerequisites

Use the included setup.sh script to create all the prerequisites for this sample, you can run it in the Azure Cloud Shell after you have changed its permissions, like:

chmod 700 setup.sh
./setup.sh

Usage

Use the service principal details to log into Azure, az login --service-principal -u <service_principal_name> -p "<service_principal_password>" --tenant "<service_principal_tenant>"

Replace both the storage_account_name & access_key properties in the main.tf file with the output from the setup.sh script

Let's now run the terraform commands:

cd templates/basics/
terraform init -reconfigure
terraform plan -var-file="local.tfvars" -var "environment=dev" -out=plan
terraform apply plan
terraform destroy -var-file="local.tfvars" -var "environment=dev"

This sample showcases the following Terraform concepts:

References

This sample was built using the following references:

About

Demonstrates using Terraform on Azure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published