Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Amazon VPC Lattice - VPC Lattice service network examples

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:

  1. VPC Lattice service network without auth policy configured. Access logs are configured for CloudWatch logs, S3, and Data Firehose.
  2. VPC Lattice service network with auth policy configured.
  3. VPC Lattice service network created outside the module and referenced in the module.
  4. 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.

Requirements

Name Version
terraform >= 1.3.0
aws >= 4.66.0

Providers

Name Version
aws >= 4.66.0
random n/a

Modules

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.1

Resources

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

Inputs

Name Description Type Default Required
aws_region AWS Region to use. string "eu-west-1" no
vpcs VPCs to create. map(any)
{
"vpc1": {
"cidr_block": "10.0.0.0/24",
"number_azs": 2
},
"vpc2": {
"cidr_block": "10.0.1.0/24",
"number_azs": 2
}
}
no

Outputs

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.