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
Include JSONStateOutputs #31466
Include JSONStateOutputs #31466
Conversation
Hi @annawinkler! I don't think I have sufficient context to dig into the details of this PR right now, but I did just want to address your specific question about beta features. There's not really any such thing as a "beta feature" in Terraform CLI, because once someone has started using a particular version of Terraform CLI we can't take that away from them: any future changes to the API must be in some sense backward-compatible with any client we ship as part of a stable Terraform CLI release. We do have a couple options at our disposal, though:
From what I see in the PR, this seems more like an option-1-flavored problem, since this is just an additional property in the API request that users have no direct control over once they've upgraded. If the remote API will quietly ignore a new object property it doesn't expect then this might well just solve itself, as long as we're prepared to rename the property in the event that we need to change the design in a breaking way, and have the API either continue to support the old shape for backward compatibility or accept that older CLI versions cannot generate this data in the way Terraform Cloud needs it. I hope that's helpful in deciding how best to proceed here! |
2094396
to
4f99fe7
Compare
4f99fe7
to
58d41b4
Compare
58d41b4
to
8284a51
Compare
8284a51
to
149b984
Compare
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.
Just minor feedback. I smoke tested this and couldn't find any issues.
149b984
to
d72911a
Compare
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
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. |
Description
This PR is part of the outputs project, and builds on the work of two previously-opened (not merged) PRs: 31284, and 31241.
The goal of the project is to show more accurate type information, and initially we tried including all of the state data as JSON and there were concerns that some of the terraform commands would not be performant with this amount of data.
This is attempt number three. With this attempt, we've reduced the amount of JSON data in the state - we want to include only the state outputs JSON in a new field,
JSONStateOutputs
.This feature is in beta, and is optional, so if it is not included, Terraform Cloud continues merrily along as before without the additional type information.
Still to do:
Test Plan
go install
~/go/bin/terraform apply