-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
62 lines (54 loc) · 975 Bytes
/
main.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
53
54
55
56
57
58
59
60
61
62
#
# DO NOT DELETE THESE LINES!
#
# Your AMI ID is:
#
# ami-d651b8ac
#
# Your subnet ID is:
#
# subnet-a2a469e9
#
# Your security group ID is:
#
# sg-2788a154
#
# Your Identity is:
#
# NWI-vault-salamander
terraform {
backend "atlas" {
name = "rohitbordia/example"
}
}
#
module "example"{
source = "./example-module"
}
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.aws_region}"
}
variable "aws_access_key" {
type = "string"
}
variable "aws_secret_key" {
type = "string"
}
variable "aws_region" {
type= "string"
default = "us-east-1"
}
resource "aws_instance" "web" {
# ...
instance_type = "t2.micro"
ami = "ami-d651b8ac"
subnet_id = "subnet-a2a469e9"
vpc_security_group_ids = ["sg-2788a154"]
tags {
Identity = "NWI-vault-salamander",
name = "web ${count.index} + 1 ",
title = "Engineer"
}
}