Skip to content

Commit 337fff6

Browse files
committed
perf(): Added enable_dns_support, enable_dns_hostnames and chanaged name variables
1 parent 8362b64 commit 337fff6

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ module "vpc" {
1111
name = "my-vpc"
1212
cidr = "10.0.0.0/16"
1313
14+
enable_dns_hostnames = true
15+
enable_dns_support = true
16+
1417
azs = ["eu-west-2a", "eu-west-2b", "eu-west-2c"]
1518
private_subnets = ["10.0.0.0/24", "10.0.1.0/24", "10.0.2.0/24"]
1619
public_subnets = ["10.0.3.0/24", "10.0.4.0/24", "10.0.5.0/24"]

main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# VPC
22

33
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+
}
510
}

variables.tf

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
variable "name" {
1+
variable "vpc_name" {
22
description = "Name tag for VPC"
33
type = string
4-
default = ""
4+
default = "main"
55
}
66

7-
variable "cidr" {
7+
variable "vpc_cidr" {
88
description = "The IPv4 CIDR block for the VPC"
99
type = string
1010
default = "10.0.0.0/16"
1111
}
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+
}

0 commit comments

Comments
 (0)