Skip to content

Commit 09b6c31

Browse files
committed
terraform: default to random cidr block for vpcs
1 parent 361a28c commit 09b6c31

File tree

12 files changed

+43
-31
lines changed

12 files changed

+43
-31
lines changed

terraform/aws/aws-ec2-autoscaling-dual-subnet/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ module "vpc" {
3636

3737
name = local.name
3838
tags = local.aws_tags
39-
40-
cidr = "10.0.80.0/22"
41-
42-
public_subnets = ["10.0.80.0/24"]
43-
private_subnets = ["10.0.81.0/24"]
4439
}
4540

4641
resource "tailscale_tailnet_key" "main" {

terraform/aws/aws-ec2-autoscaling-dual-subnet/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "vpc_id" {
22
value = module.vpc.vpc_id
33
}
44

5+
output "vpc_cidr" {
6+
value = module.vpc.vpc_cidr_block
7+
}
8+
59
output "nat_public_ips" {
610
value = module.vpc.nat_public_ips
711
}

terraform/aws/aws-ec2-autoscaling-session-recorder/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ module "vpc" {
3131

3232
name = local.name
3333
tags = local.aws_tags
34-
35-
cidr = "10.0.80.0/22"
36-
37-
public_subnets = ["10.0.80.0/24"]
38-
private_subnets = ["10.0.81.0/24"]
3934
}
4035

4136
resource "aws_vpc_endpoint" "recorder" {

terraform/aws/aws-ec2-autoscaling-session-recorder/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "vpc_id" {
22
value = module.vpc.vpc_id
33
}
44

5+
output "vpc_cidr" {
6+
value = module.vpc.vpc_cidr_block
7+
}
8+
59
output "nat_public_ips" {
610
value = module.vpc.nat_public_ips
711
}

terraform/aws/aws-ec2-autoscaling/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ module "vpc" {
3535

3636
name = local.name
3737
tags = local.aws_tags
38-
39-
cidr = "10.0.80.0/22"
40-
41-
public_subnets = ["10.0.80.0/24"]
42-
private_subnets = ["10.0.81.0/24"]
4338
}
4439

4540
resource "tailscale_tailnet_key" "main" {

terraform/aws/aws-ec2-autoscaling/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "vpc_id" {
22
value = module.vpc.vpc_id
33
}
44

5+
output "vpc_cidr" {
6+
value = module.vpc.vpc_cidr_block
7+
}
8+
59
output "nat_public_ips" {
610
value = module.vpc.nat_public_ips
711
}

terraform/aws/aws-ec2-instance-dual-stack-ipv4-ipv6/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ module "vpc" {
3636
name = local.name
3737
tags = local.aws_tags
3838

39-
cidr = "10.0.80.0/22"
40-
41-
public_subnets = ["10.0.80.0/24"]
42-
private_subnets = ["10.0.81.0/24"]
43-
4439
enable_ipv6 = true
4540
}
4641

terraform/aws/aws-ec2-instance-dual-stack-ipv4-ipv6/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "vpc_id" {
22
value = module.vpc.vpc_id
33
}
44

5+
output "vpc_cidr" {
6+
value = module.vpc.vpc_cidr_block
7+
}
8+
59
output "nat_public_ips" {
610
value = module.vpc.nat_public_ips
711
}

terraform/aws/aws-ec2-instance/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ module "vpc" {
3535

3636
name = local.name
3737
tags = local.aws_tags
38-
39-
cidr = "10.0.80.0/22"
40-
41-
public_subnets = ["10.0.80.0/24"]
42-
private_subnets = ["10.0.81.0/24"]
4338
}
4439

4540
resource "tailscale_tailnet_key" "main" {

terraform/aws/aws-ec2-instance/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "vpc_id" {
22
value = module.vpc.vpc_id
33
}
44

5+
output "vpc_cidr" {
6+
value = module.vpc.vpc_cidr_block
7+
}
8+
59
output "nat_public_ips" {
610
value = module.vpc.nat_public_ips
711
}

0 commit comments

Comments
 (0)