Skip to content

Demonstrate how to use modules shared on the public Terraform Registry, and create your own

License

Notifications You must be signed in to change notification settings

lrakai/terraform-on-azure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-on-azure

Demonstrate how to use modules shared on the public Terraform Registry, and create your own. The goal is to use modules to deploy a web server in Azure.

Environment on completion

Getting Started

An Azure RM template is included in infrastructure/ to create the environment:

Using Azure PowerShell, do the following to provision the resources:

.\startup.ps1

Alternatively, you can perform a one-click deploy with the following button:

Following Along

  1. Create a Bash Azure Cloud Shell in the cloudshell storage account that is created by the template. Terraform is installed in the cloud shell by default and is automatically authenticated.

  2. Copy the files in the src/ directory to the Cloud Shell file share.

  3. Change into the clouddrive/ directory in the Cloud Shell to see the copied files.

  4. Initialize the working directory with terraform init

    1. Cloud Shell doesn't support soft links. As a workaround you can create copies of the modules in the .terraform/modules directory using the directory names given in the error messages
  5. Apply the configuration changes with terraform apply to have all the resources created and the VM provisioned.

Tearing Down

When finished, remove the Azure resources with:

.\teardown.ps1

About

Demonstrate how to use modules shared on the public Terraform Registry, and create your own

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published