Skip to content

plus3it/terraform-aws-tardigrade-pcx

Repository files navigation

terraform-aws-tardigrade-pcx

Terraform module to create a peering connection

Testing

Manual testing:

# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx 
make terraform/pytest PYTEST_ARGS="-v --nomock"

For automated testing, PYTEST_ARGS is optional and no profile is needed:

make mockstack/up
make terraform/pytest PYTEST_ARGS="-v"
make mockstack/clean

Requirements

Name Version
terraform >= 0.15
aws >= 3.0

Providers

Name Version
aws >= 3.0
aws.peer >= 3.0

Resources

Name Type
aws_caller_identity.peer data source

Inputs

Name Description Type Default Required
peer_vpc_id The ID of the VPC with which you are creating the VPC Peering Connection string n/a yes
vpc_id The ID of the requester VPC string n/a yes
peer_tags Map of tags to add to the peer-side of the VPC peering connection map(string) {} no
routes List of VPC route objects with a target of the peering connection
list(object({
# name is used as for_each key
name = string
provider = string
route_table_id = string
destination_cidr_block = string
destination_ipv6_cidr_block = string
}))
[] no
tags Map of tags to add to the requester VPC peering connection map(string) {} no

Outputs

Name Description
vpc_peering_connection_id The ID of the VPC Peering Connection
vpc_peering_connection_status The status of the VPC Peering Connection request