Implementing Cloud Design Patterns for AWS(Second Edition)
上QQ阅读APP看书,第一时间看更新

Types

You can get different processor and memory configurations on your instances. Let's abstract our provider into a root file and move our outputs into a file of their own called main.tf:

provider "aws" {
region = "us-east-1"
}
module "compute" {
source = "./compute"
}

And we will do the same for another file called outputs.tf:

output "id" {
value = "${aws_instance.example.id}"
}

And finally, we can do this for the variables.tf file:

variable "zones" {
default = ["us-east-1a", "us-east-1b"]
}