The HVN peering connection resource allows you to manage a peering connection between HVNs.
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
}
hvn_1
(String) The unique URL of one of the HVNs being peered.hvn_2
(String) The unique URL of one of the HVNs being peered.project_id
(String, Deprecated) The ID of the HCP project where HVN peering connection is located. Always matches hvn_1's project ID. Setting this attribute is deprecated, but it will remain usable in read-only form.timeouts
(Block, Optional) (see below for nested schema)created_at
(String) The time that the peering connection was created.expires_at
(String) The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED
or ACTIVE
state.id
(String) The ID of this resource.organization_id
(String) The ID of the HCP organization where the peering connection is located. Always matches both HVNs' organization ID.peering_id
(String) The ID of the peering connection.self_link
(String) A unique URL identifying the peering connectionstate
(String) The state of the HVN peering connection.timeouts
Optional:
create
(String)default
(String)delete
(String)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