-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevops.tf
52 lines (41 loc) · 838 Bytes
/
devops.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
variable "region" {
default = "us-east-1"
}
variable "newami" {
description = "ami-XXXXXX"
}
variable "vpcid" {
default = "vpc-d4eb24b2"
}
variable "azs" {
default = "us-east-1a"
}
variable "instance_type" {
default = "t2.micro"
}
variable "keyname" {
default = "devops"
}
variable "securitygroups" {
default = [ "Dev" ]
}
variable "subnets" {
default = "subnet-42235a0b"
}
provider "aws" {
region = "${var.region}"
}
resource "aws_instance" "test-terraform" {
ami = "${var.newami}"
instance_type = "${var.instance_type}"
key_name = "${var.keyname}"
security_groups = "${var.securitygroups}"
availability_zone = "${var.azs}"
tags {
Name = "web-instance"
}
}
terraform {
# The configuration for this backend will be filled in by Terragrunt
backend "s3" {}
}