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

Migrate dns data sources back to the SDK to solve auth issue resulting from migration to plugin framework #17847

Conversation

modular-magician
Copy link
Collaborator

Description

Hopefully will fix #16832

What this PR does

This PR returns these data sources back to being implemented with the SDK:

  • google_dns_keys
  • google_dns_managed_zone
  • google_record_set

The PR also migrates google_dns_managed_zones to the SDK. It was originally implemented in the plugin framework.

When resources were migrated to the PF from SDK there were some small schema changes, namely adding id fields to schemas. These changes have been implemented in the new SDK code for the data sources, even though the original SDK code didn't contain them.

Why this PR is happening

tl;dr of the timeline leading to this PR:

  • Early 2023
    • The provider was muxed and resulted in a number of customer issues, which were not caught by acceptance tests.
    • Acceptance tests for identified issues were subsequently added
    • Important detail is that the SDK and PF sides of the provider contain parallel implementations of provider configuration logic
  • Spring 2023
  • Jan 2024
    • I have a customer issue with a deadline to implement a plural version of the google_dns_managed_zone data source. I implement it in plugin-framework with the rationale that I'm about to start digging into the previous migration work and working through issues such as VCR test problem, so adding one more problematic data source is OK (spoiler: I was wrong).
    • I'm alerted to an issue opened in Dec 2023 that indicates there are auth issues specific to the dns data sources and not the dns resources, i.e specific to the plugin-framework migrated parts of that service.

I believe the issue data.google_dns_managed_zone always fails with "Post "https://oauth2.googleapis.com/token": context canceled" shows there are problems with the provider configuration code implemented in the plugin-framework side of the provider. All our acceptance tests auth the provider in one way, so this bug wasn't identified until the first issue was opened.

Given that tweaking how the plugin-framework provider is authenticated is a non-trivial task, and that I will also need to make large changes to the central provider configuration code to address the VCR issue, I decided that the best way to resolve the problem for users is to revert the changes to the dns data sources and for me to do this work 'in my own time'.

Testing

I've manually tested and also have some acc tests but they're highly dependent on the machine running them.

Next steps

In future I'll fully investigate the auth issues in the plugin-framework implementation of the provider configuration logic. I suspect I'll need to make wider changes in that code to avoid having 2 parallel implementations, so I chose to do that work separately to addressing the issue linked to this this PR.

Relevant issues and PRs


Release Note Template for Downstream PRs (will be copied)

dns: fixed bug where some methods of authentication didn't work when using `dns` data sources

Derived from GoogleCloudPlatform/magic-modules#10368

…ing from migration to plugin framework (hashicorp#10368)

[upstream:81454ae2edf4f6861cdf426de49d48b0dc0b2cb7]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 0295085 into hashicorp:main Apr 15, 2024
3 checks passed
Copy link

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 issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data.google_dns_managed_zone always fails with "Post "https://oauth2.googleapis.com/token": context canceled"
1 participant