-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathvariables.tf
58 lines (46 loc) · 1.15 KB
/
variables.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
variable "project" {
description = "Project tag."
}
variable "subnet_id" {
description = "The VPC Subnet ID to launch in."
}
variable "ssh_key" {
description = "The key name of the Key Pair to use for the instance."
}
variable "allowed_hosts" {
description = "CIDR blocks of trusted networks"
type = list(string)
default = ["0.0.0.0/0"]
}
variable "instance_type" {
description = "The type of instance to start."
default = "t3.micro"
}
variable "disk_size" {
description = "The size of the root volume in gigabytes."
default = 10
}
variable "internal_networks" {
type = list(string)
description = "Internal network CIDR blocks."
}
data "aws_ami" "centos" {
most_recent = true
filter {
name = "product-code"
values = ["aw0evgkw8e5c1q413zgy5pjce"]
}
owners = ["aws-marketplace"]
}
data "aws_subnet" "public" {
id = local.subnet_id
}
locals {
vpc_id = data.aws_subnet.public.vpc_id
project = var.project
ami_id = data.aws_ami.centos.id
disk_size = var.disk_size
subnet_id = var.subnet_id
ssh_key = var.ssh_key
instance_type = var.instance_type
}