Use variable in Terraform remote backend

后端 未结 2 1202
广开言路
广开言路 2020-12-11 23:15
# Using a single workspace:
terraform {
  backend \"remote\" {
    hostname = \"app.terraform.io\"
    organization = \"company\"

    workspaces {
      name = \"my         


        
2条回答
  •  一整个雨季
    2020-12-11 23:55

    I had the same problems and was very disappointed with the need of additional init/wrapper scripts. Some time ago I started to use Terragrunt.

    It's worth taking a look at Terragrunt because it closes the gap between Terraform and the lack of using variables at some points, e.g. for the remote backend configuration: https://terragrunt.gruntwork.io/docs/getting-started/quick-start/#keep-your-backend-configuration-dry

提交回复
热议问题