-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Importability for Google DNS Managed Zone #13824
Importability for Google DNS Managed Zone #13824
Conversation
d7c0463
to
9627d10
Compare
@@ -32,7 +34,6 @@ func resourceDnsManagedZone() *schema.Resource { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
ForceNew: true, | |||
Default: "Managed by Terraform", |
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.
My only concern about this is that removing the default would lead Terraform to think every managed zone changed, and try to destroy then re-create it. I'm not sure what the best way to get rid of a default value is (or support imports when dealing with a default value) without causing too much backwards incompatibility. I'll check with the team and see if anyone has advice and report back.
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.
So I think if you leave the Default as it is and set this to Computed: true
, things should be OK and not cause problems. What do you think?
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.
Sounds great, I'll get that in.
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.
Eek!
resource google_dns_managed_zone: description: Default must be nil if computed
I'll leave the default as-is. Users will have to manually provide an empty description on imported managed zones.
9627d10
to
d80885f
Compare
Re-added the default description.
|
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.
LGTM, merging! Great job, thanks so much for contributing this functionality. I notice you've been on a sweep; you're doing great work, and it's really appreciated.
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Requested in #13416.
I removed the default description for the DNS managed zone because when I imported a manually created zone with no description it wanted to recreate it with the default terraform description. Since Description is an optional field I think it's appropriate to make it empty by default.