CiscoDevNet / terraform-provider-sdwan

Terraform Cisco SD-WAN Provider
https://registry.terraform.io/providers/CiscoDevNet/sdwan
Mozilla Public License 2.0
19 stars 12 forks source link

[UX2.0] management_vpn parcel does not configure ipv4 route next hops properly #266

Closed tzarski0 closed 5 months ago

tzarski0 commented 5 months ago

When you configure management_vpn parcel with ipv4 route and next hops, the terraform shows next hops in plan, but after terraform apply is run, the next-hops are not visible in UI or API response (next hop list is empty list). If I do terraform apply again, terraform claims no state change although we clearly see something is wrong with next hop. Similar code is present in wan_vpn but there it works fine. We need to fix the issue in management_vpn.

seconroy commented 5 months ago

Could you share an example resource config to recreate the issue?

tzarski0 commented 5 months ago
resource "sdwan_transport_management_vpn_profile_parcel" "transport_management_vpn_profile_parcel" {
    basic_configuration_description = "management vpn 512"
    description                     = "VPN 512 configuration"
    feature_profile_id              = "a2f247c7-646f-4fd1-b04a-fd1504ff7458"
    id                              = (known after apply)
    ipv4_static_routes              = [
        {
            administrative_distance = 1
            gateway                 = "nextHop"
            network_address         = "0.0.0.0"
            subnet_mask             = "0.0.0.0"
            },
        ]
    ipv6_static_routes              = [
        {
            next_hops = [
                {
                    address                 = "fc00::1"
                    administrative_distance = 1
                    },
                {
                    address                 = "fc00::2"
                    administrative_distance = 1
                    },
                ]
            prefix    = "fd00::/64"
            },
        ]
    name                            = "management_vpn"
    new_host_mappings               = [
        {
            host_name            = "management_servers.local"
            list_of_ip_addresses = [
                "10.0.0.1",
                "10.0.0.2",
                ]
            },
        ]
    primary_dns_address_ipv4        = "172.16.1.254"
    primary_dns_address_ipv6        = "fc00::1"
    secondary_dns_address_ipv4      = "172.16.2.254"
    secondary_dns_address_ipv6      = "fc00::2"
    version                         = (known after apply)
    }
tzarski0 commented 5 months ago

Verified and will be fixed in 0.3.10.