-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add DNS PTR record to Compute Instance #1349
Conversation
Required a revendor - I'm going to run all the compute tests on this one. |
34651ed
to
a8fc466
Compare
3563788
to
ea03a00
Compare
|
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.
Documentation?
@@ -1120,6 +1125,10 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err | |||
Type: "ONE_TO_ONE_NAT", | |||
NatIP: d.Get(acPrefix + ".nat_ip").(string), | |||
} | |||
if ptr, ok := d.GetOk(acPrefix + ".public_ptr_domain_name"); ok { | |||
ac.SetPublicPtr = true |
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.
Do you need to set SetPublicPtr
explicitely to true to turn it off if some was using public_ptr_domain_name
and now removes it from their config?
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.
I don't really know why the API requires that SetPublicPtr
be true and PublicPtrDomainName
have the value, rather than just doing a null check on the latter, but the docs are clear about that. Creating the new AccessConfig
means that it won't be set unless that's set in the current config - we do a full replace.
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.
We got bit a few times by that when in order to disable a feature in update, we had to use ForceSend false and nil values otherwise, the server would keep the value it currently had.
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.
Makes sense! I don't think it can happen here at all since we do a full replace. Let me add that to the test to be 100% sure.
ee7066e
to
db6c4d2
Compare
Test passes, even with imports, so it's definitely not a problem. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Fixes #1333.