Skip to content
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

resource meraki_devices_appliance_uplinks_settings ipv6 dynamic causing additional changes #190

Open
3 tasks done
finkjordanj opened this issue Dec 17, 2024 · 0 comments
Open
3 tasks done

Comments

@finkjordanj
Copy link

Prerequisites

  • Have you tested the operation in the API directly?
  • Do you have the latest Terraform provider version?
  • Review the compatibility matrix before opening an issue.

Describe the bug
When applying the appliance uplink settings via a module built. The ipv6 SVI entry is set to dynamic on any plan or apply seems to trigger "changes" to the address, gateways, nameservers. Would expect if this set to dynamic that it would handle not requiring a change every time to those entries since it doesn't appear to store those values.

Expected behavior
If ipv6 svi on wan interfaces set to dynamic that the address/gateway/nameservers would not require updates.

Screenshots
My modules code just hardcodes the ipv6 to dynamic.

resource "meraki_devices_appliance_uplinks_settings" "primary_mx_appliance" {
  count = var.primary_mx != "" ? 1 : 0

  serial = var.primary_mx
  interfaces = {
    wan1 = {
      enabled = true
      pppoe = {
        enabled = false
      }
      svis = {
        ipv4 = {
          address         = var.primary_isp1_connections.operations == "static" ? "${var.primary_isp1_connections.ip_address}/${var.primary_isp1_connections.subnet}" : null
          assignment_mode = var.primary_isp1_connections.operations
          gateway         = var.primary_isp1_connections.operations == "static" ? var.primary_isp1_connections.gateway : null
          nameservers = var.primary_isp1_connections.operations == "static" ? {
            addresses = var.primary_isp1_connections.dns_list
          } : null
        }
        ipv6 = {
          assignment_mode = "dynamic"
        }
      }
      vlan_tagging = {
        enabled = false
      }
    }
    wan2 = {
      enabled = var.primary_isp2_connections.key != "null" ? true : false
      pppoe = var.primary_isp2_connections.key != "null" ? {
        enabled = false
      } : null
      svis = var.primary_isp2_connections.key != "null" ? {
        ipv4 = {
          address         = var.primary_isp2_connections.operations == "static" ? "${var.primary_isp2_connections.ip_address}/${var.primary_isp2_connections.subnet}" : null
          assignment_mode = var.primary_isp2_connections.operations
          gateway         = var.primary_isp2_connections.operations == "static" ? var.primary_isp2_connections.gateway : null
          nameservers = var.primary_isp2_connections.operations == "static" ? {
            addresses = var.primary_isp2_connections.dns_list
          } : null
        }
        ipv6 = {
          assignment_mode = "dynamic"
        }
      } : null
      vlan_tagging = var.primary_isp2_connections.key != "null" ? {
        enabled = false
      } : null
    }
  }
}

The output of my plan after an apply is already done.

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.pfg-managed-meraki-network.meraki_devices_appliance_uplinks_settings.primary_mx_appliance[0] will be updated in-place
  ~ resource "meraki_devices_appliance_uplinks_settings" "primary_mx_appliance" {
      ~ interfaces = {
          ~ wan1 = {
              ~ svis         = {
                  ~ ipv6 = {
                      + address         = (known after apply)
                      + assignment_mode = "dynamic"
                      + gateway         = (known after apply)
                      + nameservers     = (known after apply)
                    }
                    # (1 unchanged attribute hidden)
                }
                # (3 unchanged attributes hidden)
            }
            # (1 unchanged attribute hidden)
        }
        # (1 unchanged attribute hidden)
    }

  # module.pfg-managed-meraki-network.meraki_devices_appliance_uplinks_settings.secondary_mx_appliance[0] will be updated in-place
  ~ resource "meraki_devices_appliance_uplinks_settings" "secondary_mx_appliance" {
      ~ interfaces = {
          ~ wan1 = {
              ~ svis         = {
                  ~ ipv6 = {
                      + address         = (known after apply)
                      + assignment_mode = "dynamic"
                      + gateway         = (known after apply)
                      + nameservers     = (known after apply)
                    }
                    # (1 unchanged attribute hidden)
                }
                # (3 unchanged attributes hidden)
            }
            # (1 unchanged attribute hidden)
        }
        # (1 unchanged attribute hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

Debug
Please provide provider debug. This will help us get a clearer picture of the problem you are having, therefore the solution will be more effective.
To enable debug:

export MERAKI_DEBUG=true
export TF_LOG=DEBUG

The two debug links that seem to call out the WAN SVI

2024-12-17T17:11:51.277Z [DEBUG] provider.terraform-provider-meraki_v0.2.13-alpha: Value switched to prior value due to semantic equality logic: tf_provider_addr=registry.terraform.io/CiscoDevNet/meraki tf_req_id=b59d0719-bbd5-bde2-6ae9-866fd605c935 tf_resource_type=meraki_devices_appliance_uplinks_settings @caller=github.com/hashicorp/[email protected]/internal/fwschemadata/value_semantic_equality.go:91 @module=sdk.framework tf_attribute_path=interfaces.wan2.svis.ipv6 tf_rpc=ReadResource timestamp=2024-12-17T17:11:51.277Z

2024-12-17T17:11:51.277Z [DEBUG] provider.terraform-provider-meraki_v0.2.13-alpha: Value switched to prior value due to semantic equality logic: @caller=github.com/hashicorp/[email protected]/internal/fwschemadata/value_semantic_equality.go:91 tf_attribute_path=interfaces.wan1.svis.ipv6 tf_provider_addr=registry.terraform.io/CiscoDevNet/meraki tf_req_id=b59d0719-bbd5-bde2-6ae9-866fd605c935 tf_rpc=ReadResource @module=sdk.framework tf_resource_type=meraki_devices_appliance_uplinks_settings timestamp=2024-12-17T17:11:51.277Z

2024-12-17T17:11:51.284Z [DEBUG] provider.terraform-provider-meraki_v0.2.13-alpha: marking computed attribute that is null in the config as unknown: tf_req_id=5bd668b1-a385-2ffe-1b17-29002ca5137c tf_provider_addr=registry.terraform.io/CiscoDevNet/meraki tf_attribute_path="AttributeName(\"interfaces\").AttributeName(\"wan1\").AttributeName(\"svis\").AttributeName(\"ipv6\").AttributeName(\"address\")" tf_resource_type=meraki_devices_appliance_uplinks_settings tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:467 @module=sdk.framework timestamp=2024-12-17T17:11:51.284Z

2024-12-17T17:11:51.284Z [DEBUG] provider.terraform-provider-meraki_v0.2.13-alpha: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:467 @module=sdk.framework tf_attribute_path="AttributeName(\"interfaces\").AttributeName(\"wan1\").AttributeName(\"svis\").AttributeName(\"ipv6\").AttributeName(\"gateway\")" tf_provider_addr=registry.terraform.io/CiscoDevNet/meraki tf_resource_type=meraki_devices_appliance_uplinks_settings tf_req_id=5bd668b1-a385-2ffe-1b17-29002ca5137c tf_rpc=PlanResourceChange timestamp=2024-12-17T17:11:51.284Z

2024-12-17T17:11:51.284Z [DEBUG] provider.terraform-provider-meraki_v0.2.13-alpha: marking computed attribute that is null in the config as unknown: tf_req_id=5bd668b1-a385-2ffe-1b17-29002ca5137c tf_resource_type=meraki_devices_appliance_uplinks_settings tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:467 tf_attribute_path="AttributeName(\"interfaces\").AttributeName(\"wan2\").AttributeName(\"svis\").AttributeName(\"ipv6\").AttributeName(\"assignment_mode\")" tf_provider_addr=registry.terraform.io/CiscoDevNet/meraki @module=sdk.framework timestamp=2024-12-17T17:11:51.284Z

2024-12-17T17:11:51.284Z [DEBUG] provider.terraform-provider-meraki_v0.2.13-alpha: marking computed attribute that is null in the config as unknown: @module=sdk.framework tf_attribute_path="AttributeName(\"interfaces\").AttributeName(\"wan2\").AttributeName(\"svis\").AttributeName(\"ipv6\")" tf_provider_addr=registry.terraform.io/CiscoDevNet/meraki tf_req_id=5bd668b1-a385-2ffe-1b17-29002ca5137c tf_resource_type=meraki_devices_appliance_uplinks_settings tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:467 timestamp=2024-12-17T17:11:51.284Z

Environment (please complete the following information):

  • Terraform version: 1.10.2
  • Meraki provider version: 0.2.13-alpha
  • OS Version: ubuntu 22.04

Additional context
I have my ipv4 also set to dynamic but those interfaces dont seem to require an updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant