-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvariables.tf
More file actions
75 lines (62 loc) · 1.46 KB
/
variables.tf
File metadata and controls
75 lines (62 loc) · 1.46 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
// App vars
variable "app_name" {
description = "Name of the application"
default = "goodrx-api"
}
variable "app_port" {
description = "App port to be served"
default = 80
}
variable "environment" {
description = "App environment"
default = "demo"
}
// AWS vars
variable "aws_access_key" {
description = "AWS access key (AWS_ACCESS_KEY_ID)."
default = ""
}
variable "aws_secret_key" {
description = "AWS secret key (AWS_SECRET_ACCESS_KEY)."
default = ""
}
variable "aws_region" {
description = "AWS region"
default = "eu-west-2"
}
// Network vars
variable "availability_zones" {
default = ["eu-west-2a", "eu-west-2b"]
description = "List of availability zones"
}
variable "vpc_cidr" {
description = "CIDR for VPC"
default = "10.0.0.0/16"
}
variable "public_subnet_az1_cidr" {
description = "CIDR for az1 public subnet"
default = "10.0.20.0/24"
}
variable "public_subnet_az2_cidr" {
description = "CIDR for az2 public subnet"
default = "10.0.21.0/24"
}
// Instance vars
variable "instance_type" {
description = "Instance type"
default = "t2.micro"
}
variable "ssh_port" {
description = "Port for SSH access"
default = 22
}
// Security
variable "allowed_ssh_ips" {
description = "CIDR blocks allowed for SSH access"
type = "list"
default = ["0.0.0.0/0"]
}
// Locals
locals {
public_subnet_cidrs = ["${var.public_subnet_az1_cidr}", "${var.public_subnet_az2_cidr}"]
}