-
Notifications
You must be signed in to change notification settings - Fork 0
/
ec2-machines.tf
36 lines (36 loc) · 1.19 KB
/
ec2-machines.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
resource "aws_instance" "webapp1" {
ami = var.ami
instance_type = "t2.micro"
associate_public_ip_address = "true"
subnet_id = aws_subnet.PublicAZA.id
vpc_security_group_ids = [aws_security_group.WebServer.id]
key_name = var.key_name
tags = {
Name = "ion-WebApp1"
}
user_data = file("app-userdata.sh")
}
resource "aws_instance" "webapp2" {
ami = var.ami
instance_type = "t2.micro"
associate_public_ip_address = "true"
subnet_id = aws_subnet.PublicAZB.id
vpc_security_group_ids = [aws_security_group.WebServer.id]
key_name = var.key_name
tags = {
Name = "ion-WebApp2"
}
user_data = file("app-userdata.sh")
}
resource "aws_instance" "webapp3" {
ami = var.ami
instance_type = "t2.micro"
associate_public_ip_address = "true"
subnet_id = aws_subnet.PublicAZC.id
vpc_security_group_ids = [aws_security_group.WebServer.id]
key_name = var.key_name
tags = {
Name = "ion-WebApp3"
}
user_data = file("app-userdata.sh")
}