New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GCS backend docs for TF >=0.12 #32065
Conversation
Updated GCS remote backend to include the >=0.12 remote backend data source formatting (incl .output before output name)
removed old data source example
Thanks for this submission! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lnesteroff 👋 thanks for this update
This section of the docs is pretty old (6 years!) so there's a bunch of things that can be improved here. I went to go read up about the template provider used for this example config and I found that it has been deprecated and isn't recommended for use in newer versions of Terraform. Because of this, I'm thinking we should change the example to use a different resource so we don't encourage people to use it.
Would you be happy to update your PR with a new example resource that uses data from data.terraform_remote_state.foo
? A simple example I thought of was the local_file resource (see example below) but you could pick a different resource if you'd like
resource "local_file" "foo" {
content = data.terraform_remote_state.foo.outputs.greeting
filename = "${path.module}/outputs.txt"
}
The above is more of a nit than a required change- please feel free to not do if you don't have time. The only thing I think requires changes is updating output
to outputs
.
Cheers! - Sarah
updated to local_file and output->outputs
Good catch, updated both your suggestions |
removed "outputs" from the pre 0.12 ref
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll get this merged now
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
* Update gcs.mdx Updated GCS remote backend to include the >=0.12 remote backend data source formatting (incl .output before output name) * Update gcs.mdx removed old data source example * Update gcs.mdx updated to local_file and output->outputs * Update gcs.mdx removed "outputs" from the pre 0.12 ref
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Updated GCS remote backend to include the >=0.12 remote backend data source formatting (incl .output before output name). The current documentation is not valid if it is run with TF >= 0.12
Fixes #
Target Release
1.4.0
Draft CHANGELOG entry
ENHANCEMENTS