hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.32k stars 1.72k forks source link

Ability to create Layer 2 Partner Interconnect #9582

Open aholyoake-bc opened 3 years ago

aholyoake-bc commented 3 years ago

Community Note

Description

Currently it is impossible to create a layer 2 partner interconnect with bgp fully configured using the terraform google provider. When using a PARTNER interconnect attachment, the interconnect interfaces are automatically created with names such as auto-ia-if-test-sandbo-XXX and there is no ability to subsequently modify the bgp peer settings without resorting to hacks such as this

It is not possible to manually create the interfaces and subsequently associate them with the attachment. It is also not possible (afaik) to retrieve the names of the automatically created interfaces (i.e. via a data provider) so that we can refer to them in other states.

New or Affected Resource(s)

Potential Terraform Configuration

Given how the underlying API is behaving, I'm not sure what this should look like


resource "google_compute_interconnect_attachment" "test" {
  name                     = test
  admin_enabled      = false
  type                     = "PARTNER"
  router                   = google_compute_router.gcp_router.id
  region                   = var.gcp_region
  edge_availability_domain = "AVAILABILITY_DOMAIN_1"
  bgp_peers {
    peer_asn = ...
  }
}

References

b/359705160 b/359704531

aholyoake-bc commented 3 years ago

I've raised a support ticket with GCP and they have send this issue tracker link https://issuetracker.google.com/issues/150502627

However, at a minimum it would be great to have a gotcha / illustration of a workaround in the provider docs to stop people wasting hours where the problem lies.

Cheers!

ggtisc commented 1 month ago