generated from clowdhaus/terraform-aws-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
36 lines (30 loc) · 1.21 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
variable "application" {
description = "Application name and/or identifier"
type = string
default = null # can be left blank/out due to shared resources not tied to an application
}
variable "created_by" {
description = "The framework, tool, and/or method that created this resource - terraform, serverless, pulumi, manual, etc."
type = string
default = "terraform"
validation {
condition = can(regex("^terraform$", var.created_by))
error_message = "The created_by value should be 'terraform' since this is written in terraform."
}
}
variable "environment" {
description = "The environment does this resource belong to? - sandbox, nonprod, prod"
type = string
validation {
condition = can(regex("(^sandbox$)|(^nonprod$)|(^prod$)", var.environment))
error_message = "The environment value should be one of - sandbox, nonprod, prod."
}
}
variable "repository" {
description = "The repository name where this resource is managed and codified"
type = string
validation {
condition = can(regex("^https:\\/\\/github\\.com\\/*", var.repository))
error_message = "The repository should be in the form of `https://github.com/*`."
}
}