hcp_hvn_peering_connection (Resource)

The HVN peering connection resource allows you to manage a peering connection between HVNs.

Example Usage

resource "hcp_hvn" "hvn_1" {
  hvn_id         = "hvn-1"
  cloud_provider = "aws"
  region         = "us-west-2"
  cidr_block     = "172.25.16.0/20"
}

resource "hcp_hvn" "hvn_2" {
  hvn_id         = "hvn-2"
  cloud_provider = "aws"
  region         = "us-west-2"
  cidr_block     = "172.18.16.0/20"
}

resource "hcp_hvn_peering_connection" "peer_1" {
  hvn_1 = hcp_hvn.hvn_1.self_link
  hvn_2 = hcp_hvn.hvn_2.self_link
}

Schema

Required

Optional

Read-Only

Nested Schema for timeouts

Optional:

Import

Import is supported using the following syntax:

# Only the first HVN ID is required (hvn_1_id), HVN 2 will be populated after import.

# Using an explicit project ID, the import ID is:
# {project_id}:{hvn_1_id}:{peering_id}
terraform import hcp_hvn_peering_connection.peer_1 f709ec73-55d4-46d8-897d-816ebba28778:hvn-1:peer-1
# Using the provider-default project ID, the import ID is:
# {hvn_1_id}:{peering_id}
terraform import hcp_hvn_peering_connection.peer_1 hvn-1:peer-1