CiscoDevNet / terraform-provider-catalystcenter

Terraform Cisco Catalyst Center Provider
https://registry.terraform.io/providers/CiscoDevNet/catalystcenter
Mozilla Public License 2.0
8 stars 5 forks source link

Import of catalystcenter_ip_pool_reserved fails if more than 25 pools #122

Closed jolstorn closed 1 month ago

jolstorn commented 2 months ago

Provider version 0.1.9 fixed an issue with adding more than 25 reserved pools, but the issue is still present with import. Using v0.1.10, CC 2.3.7.6.

# catalystcenter_ip_pool_reservation.pool_reserved["*****"] will be updated in-place
  # (imported from "db10cbc6-910b-441d-80ec-0e074597fbc4,0e6528db-e9af-4189-9d41-186f13aee4cf")
  ~ resource "catalystcenter_ip_pool_reservation" "pool_reserved" {
        id                 = "0e6528db-e9af-4189-9d41-186f13aee4cf"
      + ipv4_dhcp_servers  = [
          + "*****",
          + "1*****",
        ]
      + ipv4_gateway       = "*****"
      + ipv4_global_pool   = "*****"
      + ipv4_prefix        = true
      + ipv4_prefix_length = 23
      + ipv4_subnet        = "*****"
      + ipv6_address_space = false
        name               = "*****"
        site_id            = "db10cbc6-910b-441d-80ec-0e074597fbc4"
      + type               = "Generic"
    }

  # catalystcenter_ip_pool_reservation.pool_reserved["*****"] must be replaced
  # (imported from "db10cbc6-910b-441d-80ec-0e074597fbc4,4b063e62-4f3c-487b-94e0-278bf6e38be6")
  # Warning: this will destroy the imported resource
-/+ resource "catalystcenter_ip_pool_reservation" "pool_reserved" {
      ~ id                 = "4b063e62-4f3c-487b-94e0-278bf6e38be6" -> (known after apply)
      + ipv4_dhcp_servers  = [
          + "*****",
          + "*****",
        ]
      + ipv4_gateway       = "*****"
      + ipv4_global_pool   = "1*****"
      + ipv4_prefix        = true
      + ipv4_prefix_length = 25
      + ipv4_subnet        = "*****"
      + ipv6_address_space = false
      + name               = "*****" # forces replacement
        site_id            = "db10cbc6-910b-441d-80ec-0e074597fbc4"
      + type               = "Generic"
    }

The abowe output is for object 25 (ok) and 26 (forced replacement).. Real data is replaced by ***** here.

jolstorn commented 2 months ago

I can add to this that import of more than 25 objects worked as expected for global pools

danischm commented 1 month ago

Fixed in v0.1.11 release.