-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
52 lines (46 loc) · 956 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
#
# DO NOT DELETE THESE LINES!
#
# Your AMI ID is:
#
# ami-1a14807a
#
# Your subnet ID is:
#
# subnet-e0a4cb87
#
# Your security group ID is:
#
# sg-6313eb18
#
# Your Identity is:
#
# training-jb-spider
#
/*
module "example-module" {
source = "/workstation/terraform/example-module"
#name = "example"
}
provider "dnsimple" {
token = "${var.dnsimple_token}"
account = "${var.dnsimple_account}"
}
*/
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.aws_region}"
}
resource "aws_instance" "web" {
ami = "ami-1a14807a"
instance_type = "t2.micro"
subnet_id = "subnet-e0a4cb87"
vpc_security_group_ids = ["sg-6313eb18"]
count = "${var.aws_instance_count}"
tags {
Identity = "training-jb-spider"
Name = "Shahid-Terraform-Test_${count.index+1}_of_${var.aws_instance_count}"
Account = "DEV"
}
}