Skip to content

Instantly share code, notes, and snippets.

@kenzotakahashi
Created July 23, 2016 01:08
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 kenzotakahashi/e7ee095ce84f4230050e34bfe7badf0e to your computer and use it in GitHub Desktop.
Save kenzotakahashi/e7ee095ce84f4230050e34bfe7badf0e to your computer and use it in GitHub Desktop.
# Specify the provider and access details
provider "aws" {
region = "ap-northeast-1"
}
resource "aws_instance" "web" {
ami = "ami-374db956"
instance_type = "t2.micro"
tags {
Name = "NomadAgent"
}
security_groups = "default"
}
# Create a VPC to launch our instances into
resource "aws_vpc" "default" {
cidr_block = "10.0.0.0/16"
}
# Create an internet gateway to give our subnet access to the outside world
resource "aws_internet_gateway" "default" {
vpc_id = "${aws_vpc.default.id}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment