-
Notifications
You must be signed in to change notification settings - Fork 10.1k
First step to enable use of TF_REATTACH_PROVIDERS with PSS #37634
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
Conversation
…ed provider is being used for PSS
fa160c5 to
0a4379e
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.
LGTM aside from that one question
| func ParseReattachProviders() (map[addrs.Provider]*plugin.ReattachConfig, error) { | ||
| in := os.Getenv(TF_REATTACH_PROVIDERS) |
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.
Wouldn't it be easier to test things and reuse the function if we continued passing the value in as an argument, rather than read the environment variable?
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.
Yeah sure, we can avoid use of t.Setenv in tests that way. My rationalisation was that moving the call to os.Getenv into this package meant that the "TF_REATTACH_PROVIDERS" string wasn't floating around the codebase, but I can address that by making calling code use the new constant.
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.
I've refactored the function signature to require the new parameters in 12f8da6
|
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. |
We kinda need the ability to use TF_REATTACH_PROVIDERS during development of PSS to work out issues with the protocol, so I've implemented the ability to use it with PSS in this branch, specifically this commit e84e15b. We're probably going to allow users to use TF_REATTACH_PROVIDERS with PSS in the end, too.
When creating the backend state file, to record how PSS is being used, this method will be used to determine if the provider is reattached and therefore needs special handling.
This PR:
parseReattachProvidersfunction that parses TF_REATTACH_PROVIDERS and allows that ENV to be used.Target Release
N/A
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry