-
Couldn't load subscription status.
- Fork 10.1k
PSS: Add reusable method for obtaining the provider factory needed for accessing a state store. #37665
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
… reading them from the deps lock file. Update calling code to accommodate this.
…ts where building binaries isn't possible
| expectedProviderDescription := "This is terraform-provider-simple v6" | ||
| if s.Provider.Body.Description != expectedProviderDescription { | ||
| t.Fatalf("expected description to be %q, but got %q", expectedProviderDescription, s.Provider.Body.Description) | ||
| } |
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.
Here's the reason for adding descriptions to the simple providers' schemas
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, you may ignore that minor nitpick about comment if you like 😄
Co-authored-by: Radek Simko <[email protected]>
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, the test failure appears to be network related
|
I'll re-run the tests |
|
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. |
This PR pulls out reusable logic that allows calling code to obtain the necessary provider factory for launching a provider for state storage into method
getStateStoreProviderFactory.To facilitate this, we also need to allow Terraform to be able to obtain provider factories from in memory locks.
Currently the only method for obtaining factories (
providerFactories) reads in locks from the dependency lock file. This isn't sufficient in the context of PSS; new code needs to obtain a factory during a time when locks are in a pending state , i.e up-to-date locks are in memory and any existing dependency lock file is outdated and hasn't yet been updated. To unblock this we've added the newProviderFactoriesFromLocksmethod that accepts in memory locks as an argument. This is parallel to the previous method, which has been renamedproviderFactories=>ProviderFactories.Other changes in this PR:
initBackendto the point wheregetStateStoreProviderFactoryis 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