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

DNS: always set rrdatas and routing_policy when reading record_set #16042

Conversation

modular-magician
Copy link
Collaborator

Motivating bug: b/301469376

Currently on read, we only update rrdatas or routing_policy if there is a non-nil value to be read from the API response - if rrdatas or routing_policy is nil, we don't do anything. This is a problem specifically when out-of-band changes are made, since either field could be set to nil and we would never update the state to match (e.g. if rrdatas is switched to routing_policy outside of Terraform, we would not update rrdatas to nil within the Terraform state).

Setting rrdatas and routing_policy unconditionally on read (with flatten when appropriate) should resolve this.

dns: fixed record set configuration parsing in `google_dns_record_set`

Derived from GoogleCloudPlatform/magic-modules#9092

…ashicorp#9092)

* always set rrdatas and routing_policy when reading record_set

* add acceptance test for oob change

* add missing import to test

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit be1c095 into hashicorp:main Sep 28, 2023
@github-actions
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 Oct 30, 2023
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.

None yet

1 participant