back
terraform {
required_providers {
hcp = ">= 0.4.0"
}
}
top
module "hcp_aws_network_peering" {
source = "./modules/hcp/d/hcp_aws_network_peering"
# hvn_id - (required) is a type of string
hvn_id = null
# peering_id - (required) is a type of string
peering_id = null
timeouts = [{
default = null
}]
}
top
variable "hvn_id" {
description = "(required) - The ID of the HashiCorp Virtual Network (HVN)."
type = string
}
variable "peering_id" {
description = "(required) - The ID of the network peering."
type = string
}
variable "timeouts" {
description = "nested block: NestingSingle, min items: 0, max items: 0"
type = set(object(
{
default = string
}
))
default = []
}
top
data "hcp_aws_network_peering" "this" {
# hvn_id - (required) is a type of string
hvn_id = var.hvn_id
# peering_id - (required) is a type of string
peering_id = var.peering_id
dynamic "timeouts" {
for_each = var.timeouts
content {
# default - (optional) is a type of string
default = timeouts.value["default"]
}
}
}
top
output "created_at" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.created_at
}
output "expires_at" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.expires_at
}
output "id" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.id
}
output "organization_id" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.organization_id
}
output "peer_account_id" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.peer_account_id
}
output "peer_vpc_cidr_block" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.peer_vpc_cidr_block
}
output "peer_vpc_id" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.peer_vpc_id
}
output "peer_vpc_region" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.peer_vpc_region
}
output "project_id" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.project_id
}
output "provider_peering_id" {
description = "returns a string"
value = data.hcp_aws_network_peering.this.provider_peering_id
}
output "this" {
value = hcp_aws_network_peering.this
}
top