最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google cloud platform - How to configure BGP on GCP Partner interconnect with terraform? - Stack Overflow

programmeradmin5浏览0评论

I'm trying following code!

resource "google_compute_router" "gcp_cloud_router" {
  name    = "router-1"
  network = var.gcp_vpc_name
  region  = var.gcp_region
  bgp {
    asn = 16550 # The Cloud Router used by PARTNER type interconnect attachments must be assigned a local ASN of '16550'
    advertise_mode    = "CUSTOM"
  }
}




# GCP Cloud Interconnect creation.

resource "google_compute_interconnect_attachment" "fcr-to-gcp" {
  project                  = var.gcp_project_id
  region                   = var.gcp_region
  name                     = "dx-to-gcp"
  edge_availability_domain = "AVAILABILITY_DOMAIN_1"
  type                     = "PARTNER"
  router                   = google_compute_router.gcp_cloud_router.id
  mtu                      = 1500
}

This code is creating a default BGP session too, which is attached to above attachment. But this BGP is missing Peer ASN. Anyone have idea how to add this BGP peer ASN using terraform?

It is not possible to add it via "google_compute_router_peer", because it is adding completelly new peer, and not allowing to use same VLAN Attachment.

So my question is "How to configure BGP on GCP Partner interconnect with terraform?"

发布评论

评论列表(0)

  1. 暂无评论