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

cloud-router-2-aws-connection re-makes aws vif every apply #140

Open
cprivitere opened this issue Oct 9, 2024 · 3 comments
Open

cloud-router-2-aws-connection re-makes aws vif every apply #140

cprivitere opened this issue Oct 9, 2024 · 3 comments

Comments

@cprivitere
Copy link

cprivitere commented Oct 9, 2024

Even when nothing has changed in the terraform config, the cloud-router-2-aws-connection module wants to delete and recreate the vif, example below:

  # module.fabric_example_cloud-router-2-aws-connection.aws_dx_private_virtual_interface.aws_virtual_interface must be replaced
-/+ resource "aws_dx_private_virtual_interface" "aws_virtual_interface" {
      ~ amazon_side_asn     = "64518" -> (known after apply)
      ~ arn                 = "arn:aws:directconnect:us-west-1:1234568901:abcde/dxvif-fh5su3fx" -> (known after apply)
      ~ aws_device          = "E4Df4-23asdfef1234" -> (known after apply)
      ~ bgp_auth_key        = (sensitive value)
      ~ connection_id       = "dxcon-ffg2tmvw" # forces replacement -> (known after apply) # forces replacement
      ~ id                  = "dxvif-fh5su3fx" -> (known after apply)
      ~ jumbo_frame_capable = false -> (known after apply)
        name                = "port2aws"
      - sitelink_enabled    = false -> null
      - tags                = {} -> null
      ~ tags_all            = {} -> (known after apply)
      ~ vlan                = 305 # forces replacement -> (known after apply) # forces replacement
        # (6 unchanged attributes hidden)
    }

Somehow it seems like the vlan and connection id are forcing the replacement.

@thogarty
Copy link
Collaborator

thogarty commented Oct 9, 2024

@cprivitere , we've had some issues with the AWS Terraform provider before on VIFs. Might not be able to resolve this one as it's not entirely under our control, but we'll look into it when we get a chance.

@cprivitere
Copy link
Author

This appears to be this issue: hashicorp/terraform-provider-aws#31318

@cprivitere
Copy link
Author

cprivitere commented Oct 15, 2024

We could add the following code to fabric_example_cloud-router-2-aws-connection/cloud-router2-aws-connection/main.tf

  lifecycle {
    ignore_changes = [
      connection_id,
      vlan
    ]
  }

But this seems like it would risk not catching valid updates to the connection or vlan id.

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

2 participants