Home > Blockchain >  Terraform remote state chicken and egg
Terraform remote state chicken and egg

Time:11-12

In order to store state remotely terraform has a config block that allows you point to a cloud resource. This article shows how to do it in Azure.

In a nutshell, it instructs the reader to use some AZ powershell commands to provision the resources.

Isn't the idea of Terraform to do the opposite of manual creation of resources? If this is true, what is a better way to do this? If its not, and I've misunderstood something, please clarify what it is that I missed.

Background: working on a greenfield application with nothing provisioned other than a git repo to store the tf files. Attempting to provision an azure static web site.

CodePudding user response:

Its normal. To use a remote backed on azurem you need to have Azure Blob container. So it must exist first, before you can use it for a remote backed.

You don't have to use any powershell commands to create the container. Use other TF code, or Azure console, SDK or whatever you want to create it.

CodePudding user response:

Terraform scaffold for Azure:

https://github.com/whiteducksoftware/terraform-scaffold-for-azure

  • Related