generated from rhythmictech/terraform-terraform-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
238 lines (221 loc) · 8.82 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
variable "tags" {
default = {}
description = "User-Defined tags"
type = map(string)
}
variable "datadog_api_key_secret_arn" {
description = "ARN of the AWS Secret containing the Datadog API key"
type = string
}
variable "name_prefix" {
default = "rhythmic-"
description = "Prefix for all resource names"
type = string
}
########################################
# Anomaly Detection Vars
########################################
variable "anomaly_cost_monitor_name" {
default = "Rhythmic-DefaultAnomalyMonitor"
description = "Name of Anomaly Detection Cost Monitor"
type = string
}
variable "anomaly_cost_subscription_name" {
default = "Rhythmic-DefaultAnomalySubscription"
description = "Name of Anomaly Detection Cost Subscription"
type = string
}
variable "anomaly_total_impact_absolute_threshold" {
description = "Minimum dollar threshold"
type = number
default = 100
}
variable "anomaly_total_impact_percentage_threshold" {
description = "Percentage threshold"
type = number
default = 10
}
########################################
# Budget Vars
########################################
variable "monitor_ri_utilization" {
description = "Enable monitoring of Reserved Instances Utilization"
type = bool
default = false
}
variable "monitor_sp_utilization" {
description = "Enable monitoring of Savings Plan Utilization"
type = bool
default = false
}
variable "ri_utilization_services" {
default = ["ec2", "elasticache", "es", "opensearch", "rds", "redshift"]
description = "List of services for Reserved Instance utilization monitoring"
type = list(string)
}
variable "service_budgets" {
default = {
"ec2" = {
time_unit = "MONTHLY"
limit_amount = "5" # Adjust this value based on your budget
limit_unit = "USD"
threshold = 90 # Notify when spending exceeds 90% of the budget
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
}
}
description = "Map of service budgets"
type = map(object({
time_unit : string
limit_amount : string
limit_unit : string
threshold : number
threshold_type : string
notification_type : string
}))
}
variable "aws_service_shorthand_map" {
description = "Map of shorthand notation for AWS services to their long form AWS services in cost and usage reporting, sorted alphabetically with lowercase keys"
type = map(string)
default = {
"apiGateway" = "Amazon API Gateway",
"appFlow" = "Amazon AppFlow",
"appRunner" = "AWS App Runner",
"appSync" = "AWS AppSync",
"athena" = "Amazon Athena",
"backup" = "AWS Backup",
"braket" = "Amazon Braket",
"chime" = "Amazon Chime",
"cloudFront" = "Amazon CloudFront",
"cloudWatch" = "Amazon CloudWatch",
"codeArtifact" = "AWS CodeArtifact",
"codeBuild" = "AWS CodeBuild",
"codeCommit" = "AWS CodeCommit",
"codeDeploy" = "AWS CodeDeploy",
"codePipeline" = "AWS CodePipeline",
"codeStar" = "AWS CodeStar",
"comprehend" = "Amazon Comprehend",
"connect" = "Amazon Connect",
"dataPipeline" = "AWS Data Pipeline",
"datadog" = "Datadog",
"deepComposer" = "AWS DeepComposer",
"deepLens" = "AWS DeepLens",
"deepRacer" = "AWS DeepRacer",
"detective" = "Amazon Detective",
"directConnect" = "AWS Direct Connect",
"documentDB" = "Amazon DocumentDB",
"dms" = "AWS Database Migration Service",
"dynamodb" = "Amazon DynamoDB",
"ec2" = "Amazon Elastic Compute Cloud - Compute",
"ecs" = "Amazon Elastic Container Service",
"efs" = "Amazon Elastic File System",
"eks" = "Amazon Elastic Kubernetes Service",
"elasticache" = "Amazon ElastiCache",
"emr" = "Amazon Elastic MapReduce",
"es" = "Amazon Elasticsearch Service",
"fargate" = "AWS Fargate",
"forecast" = "Amazon Forecast",
"fsx" = "Amazon FSx",
"gameLift" = "Amazon GameLift",
"glue" = "AWS Glue",
"greengrass" = "AWS Greengrass",
"guardDuty" = "Amazon GuardDuty",
"healthLake" = "Amazon HealthLake",
"honeycode" = "Amazon Honeycode",
"iam" = "AWS Identity and Access Management",
"inspector" = "Amazon Inspector",
"iot1Click" = "AWS IoT 1-Click",
"iotAnalytics" = "AWS IoT Analytics",
"iotButton" = "AWS IoT Button",
"iotCore" = "AWS IoT Core",
"iotDeviceManagement" = "AWS IoT Device Management",
"iotEvents" = "AWS IoT Events",
"iotSiteWise" = "AWS IoT SiteWise",
"iotThingsGraph" = "AWS IoT Things Graph",
"ivs" = "Amazon Interactive Video Service",
"kendra" = "Amazon Kendra",
"kinesis" = "Amazon Kinesis",
"kms" = "AWS Key Management Service",
"lambda" = "AWS Lambda",
"lex" = "Amazon Lex",
"lightsail" = "Amazon Lightsail",
"lookoutForVision" = "Amazon Lookout for Vision",
"lumberyard" = "Amazon Lumberyard",
"macie" = "Amazon Macie",
"managedBlockchain" = "Amazon Managed Blockchain",
"mq" = "Amazon MQ",
"msk" = "Amazon Managed Streaming for Apache Kafka",
"neptune" = "Amazon Neptune",
"opensearch" = "Amazon OpenSearch Service",
"outposts" = "AWS Outposts",
"pinpoint" = "Amazon Pinpoint",
"polly" = "Amazon Polly",
"qldb" = "Amazon Quantum Ledger Database",
"qls" = "AWS Quantum Ledger Service",
"quicksight" = "Amazon QuickSight",
"rds" = "Amazon Relational Database Service",
"redshift" = "Amazon Redshift",
"rekognition" = "Amazon Rekognition",
"robomaker" = "AWS RoboMaker",
"route53" = "Amazon Route 53",
"s3" = "Amazon Simple Storage Service",
"s3Outposts" = "Amazon S3 on Outposts",
"sagemaker" = "Amazon SageMaker",
"ses" = "Amazon Simple Email Service",
"sesv2" = "Amazon Simple Email Service v2",
"shield" = "AWS Shield",
"sns" = "Amazon Simple Notification Service",
"snowball" = "AWS Snowball",
"sqs" = "Amazon Simple Queue Service",
"stepFunctions" = "AWS Step Functions",
"storageGateway" = "AWS Storage Gateway",
"sumerian" = "Amazon Sumerian",
"swf" = "Amazon Simple Workflow Service",
"textract" = "Amazon Textract",
"timestream" = "Amazon Timestream",
"transcribe" = "Amazon Transcribe",
"transcribeMedical" = "Amazon Transcribe Medical",
"translate" = "Amazon Translate",
"transfer" = "AWS Transfer for SFTP",
"vpn" = "AWS VPN",
"waf" = "AWS WAF",
"wellArchitectedTool" = "AWS Well-Architected Tool",
"workDocs" = "Amazon WorkDocs",
"workLink" = "Amazon WorkLink",
"workMail" = "Amazon WorkMail",
"workSpaces" = "Amazon WorkSpaces",
"xRay" = "AWS X-Ray",
"zocalo" = "Amazon Zocalo"
}
}
########################################
# Cost and Usage aggregation vars
########################################
variable "enable_cur_collection" {
description = "Enable Cost and Usage Report collection for aggregation in a QuickSight CUDOS project. Be mindful of existing CUR collection processes before enabling."
type = bool
default = false
}
variable "enable_datadog_cost_management" {
default = false
description = "Enable Datadog cost management"
type = bool
}
variable "cur_forwarding_bucket_arn" {
default = null
description = "S3 bucket ARN where CUR data will be forwarded"
type = string
}
#######################################
# Expiring SPs and RIs vars
#######################################
variable "expiring_sps_and_ris_warning_exp" {
default = 30
description = "Warning expiration threshold for SPs and RIs"
type = number
}
variable "expiring_sps_and_ris_alert_exp" {
default = 7
description = "Alert expiration threshold for SPs and RIs"
type = number
}