Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (36 sloc) 1.49 KB
provider "aws" {
region = "us-east-2"
shared_credentials_file = "~/.aws/credentials"
profile = "personal"
}
terraform {
backend "s3" {
bucket = "terraform-101-tf-storage"
key = "mgmt/terraform.tfstate"
region = "us-east-2"
shared_credentials_file = "~/.aws/credentials"
profile = "personal"
encrypt = true
}
}
data "aws_availability_zones" "all" {}
module "salt-master" {
source = "../modules/generic-centos"
box_name = "salt-master"
instance_type = "t2.micro"
key_pair = "${data.terraform_remote_state.keys.personal-key-id}"
user_data = "${file("../global/userdata-scripts/saltmaster-userdata.yml")}"
create_public_ip = false
subnet_id = "${data.terraform_remote_state.sample-vpc.vpc_private_subnet_1}"
security_group_ids = ["${data.terraform_remote_state.sample-vpc.sg_internal_network}", "${data.terraform_remote_state.sample-vpc.sg_salt_stack}"]
}
module "jumpbox" {
source = "../modules/generic-centos"
box_name = "jumpbox"
instance_type = "t2.micro"
key_pair = "${data.terraform_remote_state.keys.personal-key-id}"
user_data = "${file("../global/userdata-scripts/generic-userdata.sh")}"
create_public_ip = true
subnet_id = "${data.terraform_remote_state.sample-vpc.vpc_public_subnet_1}"
security_group_ids = ["${data.terraform_remote_state.sample-vpc.sg_web_dmz}", "${data.terraform_remote_state.sample-vpc.sg_salt_stack}"]
}