forked from terraform-aws-modules/terraform-aws-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from terraform-aws-modules/master
get latest changes
- Loading branch information
Showing
13 changed files
with
1,366 additions
and
692 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
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,26 @@ | ||
# VPC with IPv6 enabled | ||
|
||
Configuration in this directory creates set of VPC resources with IPv6 enabled on VPC and subnets. | ||
|
||
## 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 --> | ||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| ipv6\_association\_id | The IPv6 CIDR block | | ||
| ipv6\_cidr\_block | The association ID for the IPv6 CIDR block | | ||
| 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
data "aws_availability_zones" "available" {} | ||
|
||
module "vpc" { | ||
source = "../.." | ||
|
||
name = "ipv6" | ||
|
||
cidr = "10.0.0.0/16" | ||
|
||
azs = [data.aws_availability_zones.available.names[0], data.aws_availability_zones.available.names[1]] | ||
private_subnets = ["10.0.1.0/24", "10.0.2.0/24"] | ||
public_subnets = ["10.0.101.0/24", "10.0.102.0/24"] | ||
database_subnets = ["10.0.103.0/24", "10.0.104.0/24"] | ||
|
||
enable_nat_gateway = false | ||
|
||
create_database_subnet_route_table = true | ||
create_database_internet_gateway_route = true | ||
|
||
enable_ipv6 = true | ||
assign_ipv6_address_on_creation = true | ||
|
||
private_subnet_assign_ipv6_address_on_creation = false | ||
|
||
public_subnet_ipv6_prefixes = [0, 1] | ||
private_subnet_ipv6_prefixes = [2, 3] | ||
database_subnet_ipv6_prefixes = [4, 5] | ||
|
||
tags = { | ||
Owner = "user" | ||
Environment = "dev" | ||
} | ||
} |
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,15 @@ | ||
# VPC | ||
output "vpc_id" { | ||
description = "The ID of the VPC" | ||
value = module.vpc.vpc_id | ||
} | ||
|
||
output "ipv6_association_id" { | ||
description = "The IPv6 CIDR block" | ||
value = module.vpc.vpc_ipv6_cidr_block | ||
} | ||
|
||
output "ipv6_cidr_block" { | ||
description = "The association ID for the IPv6 CIDR block" | ||
value = module.vpc.vpc_ipv6_association_id | ||
} |
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
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
Oops, something went wrong.