This example shows how you can use the VPC Lattice module to create VPC Lattice service networks and VPC associations. The following examples are covered:
- VPC Lattice service network without auth policy configured. Access logs are configured for CloudWatch logs, S3, and Data Firehose.
- VPC Lattice service network with auth policy configured.
- VPC Lattice service network created outside the module and referenced in the module.
- VPC Lattice service network VPC associations.
In the outputs.tf
file, you can see an example on how to obtain the VPC Lattice service network ID and ARN, access logs subscription information, and VPC associations' ID.
Name | Version |
---|---|
terraform | >= 1.3.0 |
aws | >= 4.66.0 |
Name | Version |
---|---|
aws | >= 4.66.0 |
random | n/a |
Name | Source | Version |
---|---|---|
vpclattice_service_network_referenced | ../.. | n/a |
vpclattice_service_network_with_policy | ../.. | n/a |
vpclattice_service_network_without_policy | ../.. | n/a |
vpclattice_vpc_associations | ../.. | n/a |
vpcs | aws-ia/vpc/aws | 4.4.4 |
Name | Type |
---|---|
aws_cloudwatch_log_group.service_network_loggroup | resource |
aws_iam_role.firehose_role | resource |
aws_kinesis_firehose_delivery_stream.service_network_deliverystream | resource |
aws_s3_bucket.service_network_logbucket | resource |
aws_vpclattice_service_network.external_service_network | resource |
random_string.random | resource |
aws_iam_policy_document.firehose_assume_role | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_region | AWS Region to use. | string |
"eu-west-1" |
no |
vpcs | VPCs to create. | map(any) |
{ |
no |
Name | Description |
---|---|
service_network | VPC Lattice service network (full output). |
service_network_arn | VPC Lattice service network ARN. |
service_network_id | VPC Lattice service network ID. |
service_network_log_subscriptions | VPC Lattice service network log subscriptions. |
vpc_associations | VPC Lattice VPC association IDs. |