August 2019
Beginner
608 pages
16h 7m
English
In this file, the subnets that we can use to create networks are defined. We like to split frontend and backend networks, and then apply rules from SGs to them in order to allow or disallow traffic. The following example is of an entry in that file:
resource "aws_subnet" "public-frontend_az-a" { availability_zone = "eu-central-1a" cidr_block = "10.0.11.0/24" map_public_ip_on_launch = true vpc_id = "${aws_vpc.gitlabha.id}" tags { Name = "Subnet-eu-central-1a-Frontend" }}
We can see that the availability zone is defined (which can be found at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions):
availability_zone = "eu-central-1a"
The specific IP range for this ...
Read now
Unlock full access