CodeBuild

We will initially use CodeBuild projects to help us automate our Terraform development life cycle. Variables are a construct we have not yet used in our configuration. In your Cloud9 IDE, copy your main.tf file from the previous chapter to a new folder called Chapter5. Now, let's create a variable file called tfvars.tf and add the following information:

variable "vpc_id" {  default = "vpc-1802fb62"}variable "aws_public_subnet_id" {  default = "subnet-476f170d"}
Do not put sensitive information in your variables file.

The two variables we created will be used in our next file. In the default VPC, all networks are public. To increase security, we will create a private network for build projects. In a new file called private.tf, add ...

Get Implementing Cloud Design Patterns for AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.