The vpc.tf File¶
| Filename | Location | Group | Project/Repository |
|---|---|---|---|
vpc.tf | ./vpc.tf | infrastructure | terraform |
Why?¶
The Virtual Private Cloud (VPC) gives us our own private Cloud within AWS' networks. This is the first networking element we need to get the networking ball rolling.
Breakdown¶
1 2 3 4 5 6 7 | |
We're going for a /24 sized network here because that offers us enough IPs to do what we need. We could just use a /16, but it's good practice to keep your networks as small as you can. You never know when you'll need all 65,000 IPs... ;-)
The Solution¶
1 2 3 4 5 6 7 | |
Terraform Documentation¶
| Type | Documentation | | - | - | - | | aws_vpc | Terraform AWS Provider |
Committing the Code¶
- Set your working directory to the
infrastructure/terraformrepository - Save the file as
vpc.tfand usegit add vpc.tfto add it to the Git staging area - Use
git commit -am 'creating our aws vpc'to commit the file to our repository - Push the code to GitLab.com:
git push