Skip to content

Commit 172e562

Browse files
Merge pull request #14 from yuvraj-squareops1/main
Update VPC module for supporting IPAM, IPV6 and Secondary CIDRs support
2 parents 950dec5 + b311d37 commit 172e562

File tree

20 files changed

+510
-7
lines changed

20 files changed

+510
-7
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ module "vpc" {
2727
vpc_cidr = "10.0.0.0/16"
2828
environment = "production"
2929
ipv6_enabled = true
30+
create_ipam_pool = false
31+
ipam_enabled = false
3032
flow_log_enabled = true
3133
vpn_key_pair_name = module.key_pair_vpn.key_pair_name
32-
availability_zones = 2
34+
availability_zones = ["us-east-1a", "us-east-1b"]
3335
vpn_server_enabled = false
3436
intra_subnet_enabled = true
3537
auto_assign_public_ip = true
@@ -205,6 +207,9 @@ In this module, we have implemented the following CIS Compliance checks for VPC:
205207

206208
| Name | Type |
207209
|------|------|
210+
| [aws_vpc_ipam.ipam](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipam) | resource |
211+
| [aws_vpc_ipam_pool.ipam_pool](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipam_pool) | resource |
212+
| [aws_vpc_ipam_pool_cidr.ipam_pool_cidr](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipam_pool_cidr) | resource |
208213
| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones) | data source |
209214
| [aws_ec2_instance_type.arch](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ec2_instance_type) | data source |
210215

@@ -214,19 +219,26 @@ In this module, we have implemented the following CIS Compliance checks for VPC:
214219
|------|-------------|------|---------|:--------:|
215220
| <a name="input_auto_assign_public_ip"></a> [auto\_assign\_public\_ip](#input\_auto\_assign\_public\_ip) | Specify true to indicate that instances launched into the subnet should be assigned a public IP address. | `bool` | `false` | no |
216221
| <a name="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones) | Number of Availability Zone to be used by VPC Subnets | `list(any)` | `[]` | no |
222+
| <a name="input_create_ipam_pool"></a> [create\_ipam\_pool](#input\_create\_ipam\_pool) | Whether create new IPAM pool | `bool` | `true` | no |
217223
| <a name="input_database_subnet_assign_ipv6_address_on_creation"></a> [database\_subnet\_assign\_ipv6\_address\_on\_creation](#input\_database\_subnet\_assign\_ipv6\_address\_on\_creation) | Assign IPv6 address on database subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map\_public\_ip\_on\_launch | `bool` | `null` | no |
218224
| <a name="input_database_subnet_cidrs"></a> [database\_subnet\_cidrs](#input\_database\_subnet\_cidrs) | Database Tier subnet CIDRs to be created | `list(any)` | `[]` | no |
219225
| <a name="input_database_subnet_enabled"></a> [database\_subnet\_enabled](#input\_database\_subnet\_enabled) | Set true to enable database subnets | `bool` | `false` | no |
220226
| <a name="input_default_network_acl_ingress"></a> [default\_network\_acl\_ingress](#input\_default\_network\_acl\_ingress) | List of maps of ingress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<br> {<br> "action": "deny",<br> "cidr_block": "0.0.0.0/0",<br> "from_port": 22,<br> "protocol": "tcp",<br> "rule_no": 98,<br> "to_port": 22<br> },<br> {<br> "action": "deny",<br> "cidr_block": "0.0.0.0/0",<br> "from_port": 3389,<br> "protocol": "tcp",<br> "rule_no": 99,<br> "to_port": 3389<br> },<br> {<br> "action": "allow",<br> "cidr_block": "0.0.0.0/0",<br> "from_port": 0,<br> "protocol": "-1",<br> "rule_no": 100,<br> "to_port": 0<br> },<br> {<br> "action": "allow",<br> "from_port": 0,<br> "ipv6_cidr_block": "::/0",<br> "protocol": "-1",<br> "rule_no": 101,<br> "to_port": 0<br> }<br>]</pre> | no |
227+
| <a name="input_enable_database_subnet_group"></a> [enable\_database\_subnet\_group](#input\_enable\_database\_subnet\_group) | Whether create database subnet groups | `bool` | `false` | no |
221228
| <a name="input_environment"></a> [environment](#input\_environment) | Specify the environment indentifier for the VPC | `string` | `""` | no |
229+
| <a name="input_existing_ipam_managed_cidr"></a> [existing\_ipam\_managed\_cidr](#input\_existing\_ipam\_managed\_cidr) | The existing IPAM pool CIDR | `string` | `""` | no |
222230
| <a name="input_flow_log_cloudwatch_log_group_kms_key_arn"></a> [flow\_log\_cloudwatch\_log\_group\_kms\_key\_arn](#input\_flow\_log\_cloudwatch\_log\_group\_kms\_key\_arn) | The ARN of the KMS Key to use when encrypting log data for VPC flow logs | `string` | `null` | no |
223231
| <a name="input_flow_log_cloudwatch_log_group_retention_in_days"></a> [flow\_log\_cloudwatch\_log\_group\_retention\_in\_days](#input\_flow\_log\_cloudwatch\_log\_group\_retention\_in\_days) | Specifies the number of days you want to retain log events in the specified log group for VPC flow logs. | `number` | `null` | no |
224232
| <a name="input_flow_log_enabled"></a> [flow\_log\_enabled](#input\_flow\_log\_enabled) | Whether or not to enable VPC Flow Logs | `bool` | `false` | no |
225233
| <a name="input_flow_log_max_aggregation_interval"></a> [flow\_log\_max\_aggregation\_interval](#input\_flow\_log\_max\_aggregation\_interval) | The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: `60` seconds or `600` seconds. | `number` | `60` | no |
226234
| <a name="input_intra_subnet_assign_ipv6_address_on_creation"></a> [intra\_subnet\_assign\_ipv6\_address\_on\_creation](#input\_intra\_subnet\_assign\_ipv6\_address\_on\_creation) | Assign IPv6 address on intra subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map\_public\_ip\_on\_launch | `bool` | `null` | no |
227235
| <a name="input_intra_subnet_cidrs"></a> [intra\_subnet\_cidrs](#input\_intra\_subnet\_cidrs) | A list of intra subnets CIDR to be created | `list(any)` | `[]` | no |
228236
| <a name="input_intra_subnet_enabled"></a> [intra\_subnet\_enabled](#input\_intra\_subnet\_enabled) | Set true to enable intra subnets | `bool` | `false` | no |
237+
| <a name="input_ipam_enabled"></a> [ipam\_enabled](#input\_ipam\_enabled) | Whether enable IPAM managed VPC or not | `bool` | `false` | no |
238+
| <a name="input_ipam_pool_id"></a> [ipam\_pool\_id](#input\_ipam\_pool\_id) | The existing IPAM pool id if any | `string` | `null` | no |
239+
| <a name="input_ipv4_netmask_length"></a> [ipv4\_netmask\_length](#input\_ipv4\_netmask\_length) | The netmask length for IPAM managed VPC | `number` | `16` | no |
229240
| <a name="input_ipv6_enabled"></a> [ipv6\_enabled](#input\_ipv6\_enabled) | Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. | `bool` | `false` | no |
241+
| <a name="input_ipv6_only"></a> [ipv6\_only](#input\_ipv6\_only) | Enable it for deploying native IPv6 network | `bool` | `false` | no |
230242
| <a name="input_name"></a> [name](#input\_name) | Specify the name of the VPC | `string` | `""` | no |
231243
| <a name="input_one_nat_gateway_per_az"></a> [one\_nat\_gateway\_per\_az](#input\_one\_nat\_gateway\_per\_az) | Set to true if a NAT Gateway is required per availability zone for Private Subnet Tier | `bool` | `false` | no |
232244
| <a name="input_private_subnet_assign_ipv6_address_on_creation"></a> [private\_subnet\_assign\_ipv6\_address\_on\_creation](#input\_private\_subnet\_assign\_ipv6\_address\_on\_creation) | Assign IPv6 address on private subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map\_public\_ip\_on\_launch | `bool` | `null` | no |
@@ -235,6 +247,9 @@ In this module, we have implemented the following CIS Compliance checks for VPC:
235247
| <a name="input_public_subnet_assign_ipv6_address_on_creation"></a> [public\_subnet\_assign\_ipv6\_address\_on\_creation](#input\_public\_subnet\_assign\_ipv6\_address\_on\_creation) | Assign IPv6 address on public subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map\_public\_ip\_on\_launch | `bool` | `null` | no |
236248
| <a name="input_public_subnet_cidrs"></a> [public\_subnet\_cidrs](#input\_public\_subnet\_cidrs) | A list of public subnets CIDR to be created inside the VPC | `list(any)` | `[]` | no |
237249
| <a name="input_public_subnet_enabled"></a> [public\_subnet\_enabled](#input\_public\_subnet\_enabled) | Set true to enable public subnets | `bool` | `false` | no |
250+
| <a name="input_region"></a> [region](#input\_region) | The AWS region name | `string` | `null` | no |
251+
| <a name="input_secondary_cidr_blocks"></a> [secondary\_cidr\_blocks](#input\_secondary\_cidr\_blocks) | List of the secondary CIDR blocks which can be at most 5 | `list(string)` | `[]` | no |
252+
| <a name="input_secondry_cidr_enabled"></a> [secondry\_cidr\_enabled](#input\_secondry\_cidr\_enabled) | Whether enable secondary CIDR with VPC | `bool` | `false` | no |
238253
| <a name="input_vpc_cidr"></a> [vpc\_cidr](#input\_vpc\_cidr) | The CIDR block of the VPC | `string` | `"10.0.0.0/16"` | no |
239254
| <a name="input_vpn_key_pair_name"></a> [vpn\_key\_pair\_name](#input\_vpn\_key\_pair\_name) | Specify the name of AWS Keypair to be used for VPN Server | `string` | `""` | no |
240255
| <a name="input_vpn_server_enabled"></a> [vpn\_server\_enabled](#input\_vpn\_server\_enabled) | Set to true if you want to deploy VPN Gateway resource and attach it to the VPC | `bool` | `false` | no |
@@ -252,6 +267,7 @@ In this module, we have implemented the following CIS Compliance checks for VPC:
252267
| <a name="output_vpc_cidr_block"></a> [vpc\_cidr\_block](#output\_vpc\_cidr\_block) | IPV4 CIDR Block for this VPC |
253268
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC |
254269
| <a name="output_vpc_ipv6_association_id"></a> [vpc\_ipv6\_association\_id](#output\_vpc\_ipv6\_association\_id) | The association ID for the IPv6 CIDR block |
270+
| <a name="output_vpc_secondary_cidr_blocks"></a> [vpc\_secondary\_cidr\_blocks](#output\_vpc\_secondary\_cidr\_blocks) | List of secondary CIDR blocks of the VPC |
255271
| <a name="output_vpn_host_public_ip"></a> [vpn\_host\_public\_ip](#output\_vpn\_host\_public\_ip) | IP Address of VPN Server |
256272
| <a name="output_vpn_security_group"></a> [vpn\_security\_group](#output\_vpn\_security\_group) | Security Group ID of VPN Server |
257273
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/ipam-managed-vpc/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# IPAM VPC
2+
3+
Configuration in this directory creates set of VPC resources with IPAM managed CIDRs
4+
5+
IPAM pool with desired CIDR and its allocation which restricts the overlapping of CIDRs
6+
7+
[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).
8+
9+
## Usage
10+
11+
To run this example you need to execute:
12+
13+
```bash
14+
$ terraform init
15+
$ terraform plan
16+
$ terraform apply
17+
```
18+
19+
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.
20+
21+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
22+
## Requirements
23+
24+
No requirements.
25+
26+
## Providers
27+
28+
No providers.
29+
30+
## Modules
31+
32+
| Name | Source | Version |
33+
|------|--------|---------|
34+
| <a name="module_vpc_ipam"></a> [vpc\_ipam](#module\_vpc\_ipam) | squareops/vpc/aws | n/a |
35+
36+
## Resources
37+
38+
No resources.
39+
40+
## Inputs
41+
42+
No inputs.
43+
44+
## Outputs
45+
46+
| Name | Description |
47+
|------|-------------|
48+
| <a name="output_public_subnets"></a> [public\_subnets](#output\_public\_subnets) | List of IDs of public subnets |
49+
| <a name="output_region"></a> [region](#output\_region) | AWS Region |
50+
| <a name="output_vpc_cidr_block"></a> [vpc\_cidr\_block](#output\_vpc\_cidr\_block) | AWS Region |
51+
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC |
52+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/ipam-managed-vpc/main.tf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
locals {
2+
region = "us-east-1"
3+
environment = "stage"
4+
name = "skaf"
5+
additional_aws_tags = {
6+
Owner = "SquareOps"
7+
Expires = "Never"
8+
Department = "Engineering"
9+
}
10+
vpc_cidr = "10.10.0.0/16"
11+
ipam_enabled = true
12+
}
13+
14+
module "vpc_ipam" {
15+
source = "squareops/vpc/aws"
16+
17+
name = local.name
18+
19+
ipam_enabled = local.ipam_enabled
20+
region = local.region
21+
create_ipam_pool = true
22+
vpc_cidr = local.vpc_cidr
23+
availability_zones = ["us-east-1a", "us-east-1b"]
24+
25+
private_subnet_enabled = true
26+
public_subnet_enabled = true
27+
}

examples/ipam-managed-vpc/output.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
output "region" {
2+
description = "AWS Region"
3+
value = local.region
4+
}
5+
6+
output "vpc_id" {
7+
description = "The ID of the VPC"
8+
value = module.vpc_ipam.vpc_id
9+
}
10+
11+
output "vpc_cidr_block" {
12+
description = "AWS Region"
13+
value = module.vpc_ipam.vpc_cidr_block
14+
}
15+
16+
output "public_subnets" {
17+
description = "List of IDs of public subnets"
18+
value = module.vpc_ipam.public_subnets
19+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/vpc-dualstack/providers.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
provider "aws" {
2+
region = local.region
3+
default_tags {
4+
tags = local.additional_aws_tags
5+
}
6+
}

examples/vpc-native-ipv6/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# VPC with Native IPv6 support
2+
3+
4+
VPC with native IPv6 which includes public and private subnet will be created per availability zone in addition to single NAT Gateway shared between all availability zones.
5+
6+
## Usage
7+
8+
To run this example you need to execute:
9+
10+
```bash
11+
$ terraform init
12+
$ terraform plan
13+
$ terraform apply
14+
```
15+
16+
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.
17+
18+
19+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
20+
## Requirements
21+
22+
No requirements.
23+
24+
## Providers
25+
26+
No providers.
27+
28+
## Modules
29+
30+
| Name | Source | Version |
31+
|------|--------|---------|
32+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | squareops/vpc/aws | n/a |
33+
34+
## Resources
35+
36+
No resources.
37+
38+
## Inputs
39+
40+
No inputs.
41+
42+
## Outputs
43+
44+
| Name | Description |
45+
|------|-------------|
46+
| <a name="output_database_subnets"></a> [database\_subnets](#output\_database\_subnets) | List of IDs of database subnets |
47+
| <a name="output_intra_subnets"></a> [intra\_subnets](#output\_intra\_subnets) | List of IDs of Intra subnets |
48+
| <a name="output_ipv6_vpc_cidr_block"></a> [ipv6\_vpc\_cidr\_block](#output\_ipv6\_vpc\_cidr\_block) | The IPv6 CIDR block |
49+
| <a name="output_private_subnets"></a> [private\_subnets](#output\_private\_subnets) | List of IDs of private subnets |
50+
| <a name="output_public_subnets"></a> [public\_subnets](#output\_public\_subnets) | List of IDs of public subnets |
51+
| <a name="output_region"></a> [region](#output\_region) | AWS Region |
52+
| <a name="output_vpc_cidr_block"></a> [vpc\_cidr\_block](#output\_vpc\_cidr\_block) | The CIDR of the VPC |
53+
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC |
54+
| <a name="output_vpc_ipv6_association_id"></a> [vpc\_ipv6\_association\_id](#output\_vpc\_ipv6\_association\_id) | The association ID for the IPv6 CIDR block |
55+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/vpc-native-ipv6/main.tf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
locals {
2+
name = "skaf"
3+
region = "us-east-1"
4+
environment = "stage"
5+
additional_aws_tags = {
6+
Owner = "SquareOps"
7+
Expires = "Never"
8+
Department = "Engineering"
9+
}
10+
vpc_cidr = "10.10.0.0/16"
11+
ipv6_enabled = true
12+
ipv6_only = true
13+
}
14+
15+
module "vpc" {
16+
source = "squareops/vpc/aws"
17+
name = local.name
18+
vpc_cidr = local.vpc_cidr
19+
ipv6_only = local.ipv6_only
20+
environment = local.environment
21+
ipv6_enabled = local.ipv6_enabled
22+
availability_zones = ["us-east-1a", "us-east-1b"]
23+
public_subnet_enabled = true
24+
private_subnet_enabled = true
25+
intra_subnet_enabled = true
26+
database_subnet_enabled = true
27+
public_subnet_assign_ipv6_address_on_creation = true
28+
private_subnet_assign_ipv6_address_on_creation = true
29+
database_subnet_assign_ipv6_address_on_creation = true
30+
intra_subnet_assign_ipv6_address_on_creation = true
31+
}

examples/vpc-native-ipv6/outputs.tf

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
output "region" {
2+
description = "AWS Region"
3+
value = local.region
4+
}
5+
6+
output "vpc_id" {
7+
description = "The ID of the VPC"
8+
value = module.vpc.vpc_id
9+
}
10+
11+
output "vpc_cidr_block" {
12+
description = "The CIDR of the VPC"
13+
value = module.vpc.vpc_cidr_block
14+
}
15+
16+
output "public_subnets" {
17+
description = "List of IDs of public subnets"
18+
value = module.vpc.public_subnets
19+
}
20+
21+
output "private_subnets" {
22+
description = "List of IDs of private subnets"
23+
value = module.vpc.private_subnets
24+
}
25+
26+
output "database_subnets" {
27+
description = "List of IDs of database subnets"
28+
value = module.vpc.database_subnets
29+
}
30+
31+
output "intra_subnets" {
32+
description = "List of IDs of Intra subnets"
33+
value = module.vpc.intra_subnets
34+
}
35+
36+
output "vpc_ipv6_association_id" {
37+
description = "The association ID for the IPv6 CIDR block"
38+
value = module.vpc.vpc_ipv6_association_id
39+
}
40+
41+
output "ipv6_vpc_cidr_block" {
42+
description = "The IPv6 CIDR block"
43+
value = module.vpc.ipv6_vpc_cidr_block
44+
}

examples/vpc-native-ipv6/providers.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
provider "aws" {
2+
region = local.region
3+
default_tags {
4+
tags = local.additional_aws_tags
5+
}
6+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# VPC with Multiple CIDR Supports
2+
3+
4+
MUltiple CIDRs can be attached with a VPC in addition of increasing numbers of IPs. A public and private subnet will be created per availability zone in addition to single NAT Gateway shared between all availability zones.
5+
6+
## Usage
7+
8+
To run this example you need to execute:
9+
10+
```bash
11+
$ terraform init
12+
$ terraform plan
13+
$ terraform apply
14+
```
15+
16+
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.
17+
18+
19+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
20+
## Requirements
21+
22+
No requirements.
23+
24+
## Providers
25+
26+
No providers.
27+
28+
## Modules
29+
30+
| Name | Source | Version |
31+
|------|--------|---------|
32+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | squareops/vpc/aws | n/a |
33+
34+
## Resources
35+
36+
No resources.
37+
38+
## Inputs
39+
40+
No inputs.
41+
42+
## Outputs
43+
44+
| Name | Description |
45+
|------|-------------|
46+
| <a name="output_private_subnets"></a> [private\_subnets](#output\_private\_subnets) | List of IDs of private subnets |
47+
| <a name="output_public_subnets"></a> [public\_subnets](#output\_public\_subnets) | List of IDs of public subnets |
48+
| <a name="output_region"></a> [region](#output\_region) | AWS Region |
49+
| <a name="output_vpc_cidr_block"></a> [vpc\_cidr\_block](#output\_vpc\_cidr\_block) | AWS Region |
50+
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC |
51+
| <a name="output_vpc_secondary_cidr_blocks"></a> [vpc\_secondary\_cidr\_blocks](#output\_vpc\_secondary\_cidr\_blocks) | List of secondary CIDR blocks of the VPC |
52+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
locals {
2+
name = "skaf"
3+
region = "us-east-1"
4+
environment = "stage"
5+
additional_aws_tags = {
6+
Owner = "SquareOps"
7+
Expires = "Never"
8+
Department = "Engineering"
9+
}
10+
vpc_cidr = "10.10.0.0/16"
11+
secondry_cidr_enabled = true
12+
secondary_cidr_blocks = ["10.20.0.0/16"]
13+
}
14+
15+
module "vpc" {
16+
source = "squareops/vpc/aws"
17+
name = local.name
18+
vpc_cidr = local.vpc_cidr
19+
environment = local.environment
20+
availability_zones = ["us-east-1a", "us-east-1b"]
21+
public_subnet_enabled = true
22+
private_subnet_enabled = true
23+
auto_assign_public_ip = true
24+
intra_subnet_enabled = true
25+
database_subnet_enabled = true
26+
secondry_cidr_enabled = local.secondry_cidr_enabled
27+
secondary_cidr_blocks = local.secondary_cidr_blocks
28+
}

0 commit comments

Comments
 (0)