-
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
New resource azurerm_ip_group_cidr
#17321
Conversation
@katbyte @tombuildsstuff We need a way to add/remove from CIDR groups programmatically and might need to use a custom built provider if its unclear if this gets merged into the official provider. |
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.
hey @tiwood
Thanks for this PR - apologies for the delayed review here.
I've taken a look through and whilst on the whole this is looking pretty good, we're going to need to fix the azurerm_ip_group
resource such that we don't introduce a breaking change to users configurations here - I've left some notes inline about this.
However if we can fix this up then we should be able to take another look 👍
Thanks!
ConfigMode: pluginsdk.SchemaConfigModeAttr, | ||
Optional: true, | ||
Computed: 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.
unfortunately this'd be a breaking configuration change, instead we'll need to revert this:
ConfigMode: pluginsdk.SchemaConfigModeAttr, | |
Optional: true, | |
Computed: true, | |
Optional: true, |
and instead split the Create and Update methods here such that we retrieve the existing value for cidrs
from the API and reuse this during the update, unless the cidrs
block has changed, for example:
existing, err := client.Get(...)
if err != nil { .. }
update.Properties.Cidrs = existing.Properties.Cidrs
if d.HasChange("cidrs") {
update.Properties.Cidrs = expandCidrs(d.Get("cidrs").([]interface{})
}
which'd allow users to make use of ignore_changes
to ignore changes to the cidrs
block on this resource, and use the separate resource instead - which'd need to be called out in the documentation for both of these resources
Superseded by #17321 |
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. |
This adds a new resource that allows us to manage the
CIDRs/IPs
in an existingIP Group
Example Usage