forked from Nova-reward/Nova-Rewards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
146 lines (122 loc) · 3.14 KB
/
Copy pathvariables.tf
File metadata and controls
146 lines (122 loc) · 3.14 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
variable "aws_region" {
description = "AWS region for resources"
type = string
default = "us-east-1"
}
variable "environment" {
description = "Environment name (dev, staging, prod)"
type = string
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}
variable "app_name" {
description = "Application name"
type = string
default = "nova-rewards"
}
variable "instance_type" {
description = "EC2 instance type"
type = string
default = "t3.medium"
}
variable "min_size" {
description = "Minimum number of instances in ASG"
type = number
default = 2
}
variable "max_size" {
description = "Maximum number of instances in ASG"
type = number
default = 6
}
variable "desired_capacity" {
description = "Desired number of instances in ASG"
type = number
default = 2
}
variable "health_check_path" {
description = "Health check endpoint path"
type = string
default = "/health"
}
variable "app_port" {
description = "Application port"
type = number
default = 4000
}
variable "vpc_id" {
description = "VPC ID where resources will be deployed"
type = string
}
variable "private_subnet_ids" {
description = "List of private subnet IDs for EC2 instances"
type = list(string)
}
variable "public_subnet_ids" {
description = "List of public subnet IDs for ALB"
type = list(string)
}
variable "rds_endpoint" {
description = "RDS database endpoint"
type = string
}
variable "rds_port" {
description = "RDS database port"
type = number
default = 5432
}
variable "redis_endpoint" {
description = "Redis endpoint"
type = string
}
variable "redis_port" {
description = "Redis port"
type = number
default = 6379
}
variable "s3_bucket_name" {
description = "S3 bucket name for application access"
type = string
}
variable "secrets_manager_path" {
description = "Secrets Manager path prefix for application secrets"
type = string
default = "nova-rewards/*"
}
variable "cpu_threshold" {
description = "CPU threshold for CloudWatch alarm (%)"
type = number
default = 70
}
variable "memory_threshold" {
description = "Memory threshold for CloudWatch alarm (%)"
type = number
default = 80
}
variable "error_rate_threshold" {
description = "5xx error rate threshold for CloudWatch alarm (%)"
type = number
default = 1
}
variable "ami_id" {
description = "AMI ID for EC2 instances (Amazon Linux 2 with Docker)"
type = string
# Default to Amazon Linux 2 AMI - update based on your region
default = ""
}
variable "enable_detailed_monitoring" {
description = "Enable detailed CloudWatch monitoring"
type = bool
default = true
}
variable "certificate_arn" {
description = "ARN of the SSL certificate in ACM for HTTPS listener"
type = string
}
variable "tags" {
description = "Additional tags to apply to resources"
type = map(string)
default = {}
}