» Resource: pureport_google_cloud_connection

» Example Usage

data "pureport_accounts" "main" {
  filter {
    name = "Name"
    values = ["MyAccount"]
  }
}

data "pureport_locations" "main" {
  filter {
    name = "Name"
    values = ["Sea.*"]
  }
}

data "google_compute_network" "default" {
  name = "default"
}

resource "google_compute_router" "main" {
  name    = "terraform-acc-router-${count.index + 1}"
  network = data.google_compute_network.default.name

  bgp {
    asn = "16550"
  }

  count = 2
}

resource "google_compute_interconnect_attachment" "main" {
  name   = "terraform-acc-interconnect-${count.index + 1}"
  router = element(google_compute_router.main.*.self_link, count.index)
  type   = "PARTNER"
  edge_availability_domain = "AVAILABILITY_DOMAIN_${count.index + 1}"

  lifecycle {
    ignore_changes = ["vlan_tag8021q"]
  }

  count = 2
}

resource "pureport_google_cloud_connection" "main" {
  name = "GoogleCloudTest"
  speed = "50"

  location_href = data.pureport_locations.main.locations.0.href
  network_href = data.pureport_networks.main.networks.0.href

  primary_pairing_key = google_compute_interconnect_attachment.main.0.pairing_key

  tags = {
    Environment = "production"
    Owner       = "Scott Pilgrim"
  }
}

» Argument Reference

The following arguments are supported:

  • name - (Required) The name for the connection
  • location_href - (Required) HREF for the Pureport Location to attach the connection.
  • network_href - (Required) HREF for the network to associate the connection.
  • speed - (Required) The maximum QoS for this connection. Valid values are 50, 100, 200, 300, 400, 500, 1000, 10000 in Mbps.
  • primary_pairing_key - (Required) The pairing key for the primary Google Cloud Interconnect Attachment.

  • description - (Optional) The description for the connection.
  • customer_networks - (Optional) A list of named CIDR block to easily identify a customer network.
    • name - The name for the network.
    • address - The CIDR block for the network
  • nat_config - (Optional) The Network Address Translation configuration for the connection.
    • enabled - (Required) Is NAT enabled for this connection.
    • mappings - (Optional) List of NAT mapped CIDR address
      • native_cidr - (Required) The native CIDR block to map.
  • billing_term - (Optional) The billing term for the connection: (Currently only HOURLY is supported.)
  • high_availability - (Optional) Whether a redundant gateway is/should be provisioned for this connection.
  • secodary_pairing_key - (Optional) If HA is enabled, the pairing key for the backup Google Cloud Interconnect Attachment.
  • tags - (Optional) A dictionary of user defined key/value pairs to associate with this resource.

» Attributes

  • nat_config - The Network Address Translation configuration for the connection.

    • enabled - Is NAT enabled for this connection.
    • mappings - List of NAT mapped CIDR address
      • native_cidr - (Required) The native CIDR block to map.
      • nat_cidr - The CIDR block use for NAT to the associated subnet.
    • blocks - List of reserved blocks for NAT.
    • pnat_cidr - CIDR use for PNAT between connections.
  • gateways - List of cloud gateways and their configurations.

    • name - The name of the cloud gateway.
    • description - The description of the cloud gateway.
    • availability_domain - The availability domain of the cloud gateway. The valid values are PRIMARY, SECONDARY.
    • customer_asn - The customer ASN used for BGP Peering.
    • customer_ip - The assigned IP address to the customer side of the BGP Config.
    • pureport_asn - The Pureport ASN used for BGP Peering.
    • pureport_ip - The assigned IP address to the Pureport side of the BGP Config.
    • bgp_password - The autogenerated BGP password used for authentication.
    • peering_subnet - The BGP Config subnet assigned to establish BGP peering.
    • public_nat_ip - N/A
    • remote_id - The ID of the Google Cloud Interconnect.
    • remote_id - The ID of the Google Cloud Interconnect.
    • vlan - The VLAN id for the connection to cloud services.

The Pureport Guide,