[REQUEST] Terraform Enterprise backend support
See original GitHub issueIs your feature request related to a problem? Please describe. It appears that runway only supports terraform backends of type s3, currently. My organization has acquired Terraform Enterprise, and we are working on migrating our Terraform state storage from S3 to Terraform Enterprise. Since we heavily use runway, this lack of support is causing us trouble.
Describe the solution you’d like I’ve thought of a few potential solutions to this problem:
- Update the
terraform_backend_configproperty (and the backend config file feature) to support remote backend properties. - Another potential solution could be providing the option to skip
terraform init. I don’t think this is inline with the mission ofrunway, but I’m guessing it would be a quicker/easier change. - Update the terraform backend configuration syntax to be more like that of terragrunt. If, instead of using
backend[-*].tfvarsfiles, runway used a templatizedbackend[-*].hclfile, this feature request likely wouldn’t be required and further flux in the backend space wouldn’t require rework and runway (disclaimer: I assume this is the case, as I’ve not done a deep dive on this area of the runway codebase) - Add support for
terragruntas a module type that runway can deploy.
Describe alternatives you’ve considered A few things I’ve tried to get around this limitation:
- Passing a
backend-configarg to terraform (despite the warning in the docs) - Adding a
backend[-*].tfvarsfile with the best guesses at appropriate variable names - Running
terraform initfor terraform modules before runningrunway deploy
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Backend Type: remote | Terraform - HashiCorp Developer
As of Terraform v1.1.0 and Terraform Enterprise v202201-1, we recommend using the ... The remote backend supports the following Terraform commands:.
Read more >Docs overview | hashicorp/tfe - Terraform Registry
This provider is used to interact with the many resources supported by Terraform Cloud. As Terraform Enterprise is a self-hosted distribution of Terraform ......
Read more >Backend Type: terraform enterprise
This backend is useful for uncommon tasks like migrating state into a Terraform Enterprise workspace, but we no longer recommend using it as...
Read more >Troubleshooting the Terraform integration with GitLab
The GitLab backend accepted the request, but internally stripped the period and any characters that followed from the state name. For example, a...
Read more >How to manage Terraform state - Gruntwork Blog
A number of remote backends are supported, including Amazon S3, Azure Storage, Google Cloud Storage, and HashiCorp's Terraform Cloud and Terraform Enterprise.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

PRs are always welcome for bug fixes, planned/approved features, etc.
For this one, it may be better to let me take care of it. I have a few thoughts on removing restrictions on values passed to
terraform_backend_configto open it up for future needs rather than just supporting the remote backend.The other items I will likely turn into toggleable options to allow their use at the users discretion.
I should be able to start on this later today and will let you know when I have a usable build if you would like to beta test it.
updated https://github.com/ITProKyle/terraform-cloud-test to include example uses of both
workspaces.nameandworkspaces.prefix. I also update the lock file to reference a new commit that should now autodetect when a remote backend is being used and deal with it appropriately depending on the use ofnameorprefix.through a bit of digging, I was able to find this issue: https://github.com/hashicorp/terraform/issues/21830. It would appear that not being able to specify
workspacesis a bug in v0.12 - it had worked in v0.11. The issue has been open for over a year at this point so theres no telling if it will be fixed but hopefully it will be fixed for v0.13.I’m not sure if adding support for providing it as a CLI argument for v0.11 only is worth while but I can do it if it would be useful.