August 2019
Beginner
608 pages
16h 7m
English
In the Virtual private cloud and subnets section, we explained that a VPC is the beginning of an AWS infrastructure. In the vpc.tf file, we define this:
resource "aws_vpc" "gitlabha" { cidr_block = "10.0.0.0/16" enable_dns_hostnames = true enable_dns_support = true tags{ Name = "VPC-${var.environment}" } }
We assign the VPC a private network address that, again, can be divided into subnets:
cidr_block = "10.0.0.0/16"
We want to enable DNS hostnames for this VPC:
enable_dns_hostnames = trueenable_dns_support = true
We can use tags to give the VPC a name that fits with the environment we define:
tags{ Name = "VPC-${var.environment}" }
Now that we have a basic VPC, we can divide it into further networks and create more objects. ...
Read now
Unlock full access