AWS Cloud WAN is a managed wide-area networking (WAN) service that you can use to build, manage, and monitor an unified global network that connects resources running across your cloud and on-premises environments. It provides a central dashboard from which you can connect on-premises branch offices, data centers, and Amazon Virtual Private Clouds (VPCs) across the AWS global network. You can use simple network policies to centrally configure and automate network management and security tasks, and get a complete view of your global network.
This repository shows you an example in Terraform of global communication with AWS Cloud WAN, showing the same architecture you can build in the AWS Cloud WAN Workshop.
NOTE: The resources created incur costs in your AWS Account. Consider deleting the resources created once your tests are done. For more information, check the AWS Cloud WAN pricing.
- An AWS account with an IAM user that has appropriate permissions
- Terraform installed
- Clone the repository
- If you want to follow the workshop instructions, move to the Following the lab instructions section.
- If you want to test out the code outside the lab instructions:
- Check the
variables.tffile and change the values accordingly. - The Cloud WAN policy can be found in the file
cloudwan_policy.tf, and the AWS Network Firewall policies in thefirewall_policies.tffile. - Main resources can be found in the
main.tffile, while the resources simulating the on-premises environments are in theon_prem.tffile.
- Check the
- Initialize Terraform using
terraform init.
NOTE: The final state of both workshop labs is codified in this repository. However, some pieces are commented so the first terraform apply will create only the initial architecture when starting Lab 1. To create the whole architecture in one deployment, uncomment all the commented lines and use terraform apply
NOTE: Due to the Terraform modules used, Inspection VPCs' attachments will be created at the same time as the initial environment. Take that into account when following the lab instructions.
- If you want to follow the lab guide:
terraform applyto build the initial environment.
- If you want to build the end architecture after finishing the steps, uncomment the following lines and do
terraform apply:
- In
cloudwan_policy.tfuncomment lines 59-64 and 73-147. - In
main.tfuncomment lines 33-39, 44-50, 200-206, 211-217, and 355-388.
Use terraform destroy to clean-up the test environment and avoid undesired charges.
- If you want to follow the lab guide:
- Check point 2 in Lab 1 to uncomment the corresponding lines and do
terraform applyto build the initial environment. - Follow Step 6 in the workshop guide to configure the VPN connection.
- If you want to build the end architecture after finishing the steps, uncomment the following lines and do
terraform apply:
- In
cloudwan_policy.tfuncomment lines 40-47, 59-71, and 73-161. - In
main.tfuncomment lines 33-39, 44-50, 200-206, 211-217, 355-388, 472-512 and 594-634.
Use terraform destroy to clean-up the test environment and avoid undesired charges.
### Lab 3 - Additional inspection scenarios
- If you want to follow the lab guide, check point 2 in Lab 2 to uncomment the corresponding lines and do
terraform applyto build the initial environment. - If you want to build the end architecture after finishing the steps, check lab3.md to understand what to change from the provided code.
Use terraform destroy to clean-up the test environment and avoid undesired charges.
| Name | Version |
|---|---|
| terraform | >= 1.3.0 |
| aws | >= 5.0.0 |
| Name | Version |
|---|---|
| aws | >= 5.0.0 |
| aws.awslondon | >= 5.0.0 |
| aws.awsoregon | >= 5.0.0 |
| aws.awsstockholm | >= 5.0.0 |
| Name | Source | Version |
|---|---|---|
| cloud_wan | aws-ia/cloudwan/aws | 3.3.0 |
| on_prem_vpc | aws-ia/vpc/aws | = 4.4.4 |
| oregon_compute | ./modules/compute | n/a |
| oregon_egress_vpc | aws-ia/vpc/aws | = 4.4.4 |
| oregon_firewall_policies | ./modules/firewall_policy | n/a |
| oregon_inspection_vpc | aws-ia/vpc/aws | = 4.4.4 |
| oregon_legacy_compute | ./modules/compute | n/a |
| oregon_legacy_vpc | aws-ia/vpc/aws | = 4.4.4 |
| oregon_network_firewall_egress | aws-ia/networkfirewall/aws | 1.0.2 |
| oregon_network_firewall_inspection | aws-ia/networkfirewall/aws | 1.0.2 |
| oregon_spoke_vpcs | aws-ia/vpc/aws | = 4.4.4 |
| stockholm_compute | ./modules/compute | n/a |
| stockholm_egress_vpc | aws-ia/vpc/aws | = 4.4.4 |
| stockholm_firewall_policies | ./modules/firewall_policy | n/a |
| stockholm_inspection_vpc | aws-ia/vpc/aws | = 4.4.4 |
| stockholm_legacy_compute | ./modules/compute | n/a |
| stockholm_legacy_vpc | aws-ia/vpc/aws | = 4.4.4 |
| stockholm_network_firewall_egress | aws-ia/networkfirewall/aws | 1.0.2 |
| stockholm_network_firewall_inspection | aws-ia/networkfirewall/aws | 1.0.2 |
| stockholm_spoke_vpcs | aws-ia/vpc/aws | = 4.4.4 |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| aws_regions | AWS regions to spin up resources. | map(string) |
{ |
no |
| oregon_egress_vpc | Information about the Egress VPC to create in us-west-2. | any |
{ |
no |
| oregon_inspection_vpc | Information about the Inspection VPC to create in us-west-2. | any |
{ |
no |
| oregon_legacy_vpc | Information about the Legacy VPC to create in us-west-2. | any |
{ |
no |
| oregon_spoke_vpcs | Information about the VPCs to create in us-west-2. | any |
{ |
no |
| project_identifier | Project Identifier. | string |
"CloudWAN_Workshop" |
no |
| stockholm_egress_vpc | Information about the Egress VPC to create in eu-north-1. | any |
{ |
no |
| stockholm_inspection_vpc | Information about the Inspection VPC to create in eu-north-1. | any |
{ |
no |
| stockholm_legacy_vpc | Information about the Legacy VPC to create in eu-north-1. | any |
{ |
no |
| stockholm_spoke_vpcs | Information about the VPCs to create in eu-north-1. | any |
{ |
no |
| transit_gateway_asn | Transit Gateway ASNs. | map(number) |
{ |
no |
No outputs.
