netascode / terraform-provider-iosxe

Terraform Cisco IOS-XE Provider
https://registry.terraform.io/providers/netascode/iosxe
Mozilla Public License 2.0
9 stars 3 forks source link

Request for iosxe_restconf REST Delete option #79

Open eckdd opened 1 year ago

eckdd commented 1 year ago

Hi,

Would like to see a delete/remove options in the iosxe_restconf resource that can ensure items are explicitly not in the config. An example use case would be to use the following to ensure that service call-home is not configured on any devices:

resource "iosxe_restconf" "no_service_call-home" { for_each = toset([for router in local.routers : router.name]) device = each.key path = "Cisco-IOS-XE-native:native/service/call-home" remove = true }

danischm commented 1 year ago

This is an interesting use case, though this would fundamentally change the standard resource behavior in terms of create/read/update/delete operations. I am more leaning towards a dedicated resource that attempts to remove the relevant object for create/update/delete operations. What do you think?

eckdd commented 1 year ago

A dedicated resource module would probably make more sense. 👍