Skip to content
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

fix invalid provider configuration #5609

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

megan07
Copy link
Contributor

@megan07 megan07 commented Jan 10, 2022

Fixes hashicorp/terraform-provider-google#9237

Basically, passing in a computed value to the provider definition is illegal, so i had to rip out all the setup configuration and just do that in the SDK, before the tests were run.

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)


@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 225 insertions(+), 173 deletions(-))
Terraform Beta: Diff ( 2 files changed, 243 insertions(+), 191 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudbuildWorkerPool_basic|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=241919

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is passing a computed value to a provider invalid? We have seen similar issues trying to set up the Kubernetes provider with input from a GKE cluster (or something like that) but it seems like it generally works if you create the GKE cluster first so the computed values aren't unknown.

Is there a possibility in the future of the TF dependency graph including providers so that this workflow can be possible?

@megan07
Copy link
Contributor Author

megan07 commented Jan 11, 2022

@slevenick I checked in on this because I started questioning myself, it looks like Kubernetes has implemented a way to defer their provider initialization in order to handle this, although, it sounds like this is not the recommended approach as there can be intermittent issues with it.

As for future, I see this issue open in core: hashicorp/terraform#4149

@megan07 megan07 merged commit 9637068 into GoogleCloudPlatform:master Jan 11, 2022
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 16, 2022
* fix invalid provider configuration

* fix lint errors
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 17, 2022
* fix invalid provider configuration

* fix lint errors
betsy-lichtenberg pushed a commit to betsy-lichtenberg/magic-modules that referenced this pull request Apr 25, 2022
* fix invalid provider configuration

* fix lint errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing tests: Invalid provider configuration
3 participants