-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# VPC with Outpost Subnet | ||
|
||
Configuration in this directory creates a vpc with public / private / and a private outpost subnet. | ||
|
||
This configuration uses Availability Zone IDs and Availability Zone names for demonstration purposes. Normally, you need to specify only names or IDs. | ||
|
||
[Read more about AWS regions, availability zones and local zones](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions-availability-zones). | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources. | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| terraform | >= 0.13.0 | | ||
| aws | >= 3.0 | | ||
|
||
## Providers | ||
|
||
No provider. | ||
|
||
## Inputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| outpost_arn | The ARN of the outpost where you would like subnet deployed | | ||
| outpost_az | AZ where outpost is anchored| | ||
|
||
Note - without these input variables the subnet(s) will still create however they will be homed to the region not the outpost. | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| azs | A list of availability zones spefified as argument to this module | | ||
| nat\_public\_ips | List of public Elastic IPs created for AWS NAT Gateway | | ||
| private\_subnets | List of IDs of private subnets | | ||
| public\_subnets | List of IDs of public subnets | | ||
| outpost\_subnets | List of IDs of the outpost subnets | | ||
| vpc\_cidr\_block | The CIDR block of the VPC | | ||
| vpc\_id | The ID of the VPC | | ||
|
||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# VPC | ||
output "vpc_id" { | ||
description = "The ID of the VPC" | ||
value = module.vpc.vpc_id | ||
} | ||
|
||
# CIDR blocks | ||
output "vpc_cidr_block" { | ||
description = "The CIDR block of the VPC" | ||
value = module.vpc.vpc_cidr_block | ||
} | ||
|
||
# Subnets | ||
output "private_subnets" { | ||
description = "List of IDs of private subnets" | ||
value = module.vpc.private_subnets | ||
} | ||
|
||
output "public_subnets" { | ||
description = "List of IDs of public subnets" | ||
value = module.vpc.public_subnets | ||
} | ||
# NAT gateways | ||
output "nat_public_ips" { | ||
description = "List of public Elastic IPs created for AWS NAT Gateway" | ||
value = module.vpc.nat_public_ips | ||
} | ||
|
||
# AZs | ||
output "azs" { | ||
description = "A list of availability zones spefified as argument to this module" | ||
value = module.vpc.azs | ||
} | ||
|
||
output "outpost_subnets" { | ||
description = "List of IDs of private subnets" | ||
value = module.vpc.outpost_subnets | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
terraform { | ||
required_version = ">= 0.12.21" | ||
|
||
required_providers { | ||
aws = ">= 3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters