Migrate dns
data sources back to the SDK to solve auth issue resulting from migration to plugin framework
#2157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hopefully will fix hashicorp/terraform-provider-google#16832
What this PR does
This PR returns these data sources back to being implemented with the SDK:
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:
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
google_dns_managed_zones
data source and acceptance test magic-modules#9742Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#10368