Skip to content

ned1313/env0-terraform-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

env0-terraform-tutorial

Welcome! This code is meant to accompany the Terraform Tutorial on env0's blog. The code included will deploy a resource group and container instance on Microsoft Azure.

Prerequisites

You can alternatively use the Azure Cloud Shell that has the Azure CLI and Terraform preinstalled.

Getting Started

Start by logging in to your Azure account using the Azure CLI:

# Login into Azure in a browser
az login

# Select the Azure subscription to use
az account set -s SUB_NAME

Now you can initialize Terraform:

terraform init

Deploying the Infrastructure

To deploy the infrastructure, run the following command:

terraform plan -out plan.out
terraform apply plan.out

Once you deployed it successfully, remove the commented out tags argument in the azurerm_resource_group resource and deploy again.

terraform apply -auto-approve

Destroying the Infrastructure

When you're done, you can destroy the infrastructure by running:

terraform destroy

Next Steps

I hope you enjoyed this tutorial! If you have any questions, feel free to reach out to me on Twitter or LinkedIn.

About

Repository to accompany the blog post

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages