File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ module "vpc" {
11
11
name = "my-vpc"
12
12
cidr = "10.0.0.0/16"
13
13
14
+ enable_dns_hostnames = true
15
+ enable_dns_support = true
16
+
14
17
azs = ["eu-west-2a", "eu-west-2b", "eu-west-2c"]
15
18
private_subnets = ["10.0.0.0/24", "10.0.1.0/24", "10.0.2.0/24"]
16
19
public_subnets = ["10.0.3.0/24", "10.0.4.0/24", "10.0.5.0/24"]
Original file line number Diff line number Diff line change 1
1
# VPC
2
2
3
3
resource "aws_vpc" "this" {
4
- cidr_block = var. cidr
4
+ cidr_block = var. vpc_cidr
5
+ enable_dns_hostnames = var. enable_dns_hostnames
6
+ enable_dns_support = var. enable_dns_support
7
+ tags = {
8
+ Name = " ${ var . vpc_name } "
9
+ }
5
10
}
Original file line number Diff line number Diff line change 1
- variable "name " {
1
+ variable "vpc_name " {
2
2
description = " Name tag for VPC"
3
3
type = string
4
- default = " "
4
+ default = " main "
5
5
}
6
6
7
- variable "cidr " {
7
+ variable "vpc_cidr " {
8
8
description = " The IPv4 CIDR block for the VPC"
9
9
type = string
10
10
default = " 10.0.0.0/16"
11
11
}
12
+
13
+ variable "enable_dns_hostnames" {
14
+ description = " Enables DNS hosntnames for the VPC"
15
+ type = boolean
16
+ default = true
17
+ }
18
+
19
+ variable "enable_dns_support" {
20
+ description = " Enables DNS support for the VPC"
21
+ type = boolean
22
+ default = true
23
+ }
You can’t perform that action at this time.
0 commit comments