forked from peytoncasper/terraform-servicenow-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
40 lines (31 loc) · 677 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
provider "aws" {
region = "us-west-2"
}
resource "aws_security_group" "default" {
name_prefix = "test_instance"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Created-by = "Terraform"
Identity = "test_instance"
}
}
resource "aws_instance" "web" {
ami = "ami-c62eaabe"
instance_type = var.instance_type
associate_public_ip_address = false
vpc_security_group_ids = [aws_security_group.default.id]
tags = {
Identity = "test_instance"
}
}