Skip to content

Instantly share code, notes, and snippets.

@vcaixeta
Last active February 2, 2018 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vcaixeta/026db2643eb18f0cd4ddad6d53cdbbe6 to your computer and use it in GitHub Desktop.
Save vcaixeta/026db2643eb18f0cd4ddad6d53cdbbe6 to your computer and use it in GitHub Desktop.
provider "aws" {
region = "eu-west-1"
}
resource "aws_key_pair" "setup_key" {
key_name = "lab-keys"
public_key = "${file("./ssh-key.pub")}"
}
module "network-stack" {
#configuration parameters
source = "../../modules/network-stack"
vpc_cidr = "10.250.0.0/24"
vpc_name = "netoops-lab"
subnet-public-a = "10.250.0.0/26"
subnet-public-b = "10.250.0.64/26"
subnet-private-a = "10.250.0.128/26"
subnet-private-b = "10.250.0.192/26"
}
module "vpn-instance" {
#configuration parameters
source = "../../modules/vpn-instance"
instance_name = "vpn01a"
#ami can be obtained on AWS MarkePlace, we are using CentOS7.
ami_name = "ami-6e28b517"
type = "c3.large"
#These Values come from the Module network-stack, when defining Output Variables.
subnet_id = "${module.network-stack.subnet_pub_a_id}"
sg_id = "${module.network-stack.sg_id}"
key_name = "${aws_key_pair.setup_key.key_name}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment