-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_dns_cname_record
- split create and update function to fix lifecycle - ignore
#26610
Conversation
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.
Thanks @mbfrahry. Overall looks fine, but I think changing the schema from ConflictsWith
to ExactlyOneOf
could be breaking change?
ConflictsWith: []string{"target_resource_id"}, | ||
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ExactlyOneOf: []string{"record", "target_resource_id"}, |
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 think this might be a breaking change?
payload.Properties.CNAMERecord.Cname = utils.String(record) | ||
} | ||
} | ||
|
||
if d.HasChange("target_resource_id") { | ||
payload.Properties.TargetResource = &recordsets.SubResource{} | ||
if targetId := d.Get("target_resource_id").(string); targetId != "" { | ||
payload.Properties.TargetResource.Id = utils.String(targetId) |
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.
payload.Properties.CNAMERecord.Cname = utils.String(record) | |
} | |
} | |
if d.HasChange("target_resource_id") { | |
payload.Properties.TargetResource = &recordsets.SubResource{} | |
if targetId := d.Get("target_resource_id").(string); targetId != "" { | |
payload.Properties.TargetResource.Id = utils.String(targetId) | |
payload.Properties.CNAMERecord.Cname = pointer.To(record) | |
} | |
} | |
if d.HasChange("target_resource_id") { | |
payload.Properties.TargetResource = &recordsets.SubResource{} | |
if targetId := d.Get("target_resource_id").(string); targetId != "" { | |
payload.Properties.TargetResource.Id = pointer.To(targetId) |
Hey @stephybun, it shouldn't be a breaking change because we currently error out if at least one of them isn't specified. I removed that code and added ExactlyOneOf because it's the same thing but better |
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.
Gotcha, thanks @mbfrahry LGTM 👍
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 contributions. |
No description provided.