-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
66 lines (56 loc) · 1.96 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
variable "resource_group_name" {
default = ""
description = "Azure resource group name to create log analytics workspace"
type = string
}
variable "location" {
default = ""
description = "Azure location"
type = string
}
variable "loganalytics_workspace_name" {
default = ""
type = string
description = "Loganalytics workspace name"
}
variable "loganalytics_retention_period" {
default = 7
description = "Loganalytics logs retention period"
type = number
validation {
condition = var.loganalytics_retention_period == 7 || (var.loganalytics_retention_period >= 30 && var.loganalytics_retention_period <= 730)
error_message = "The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730."
}
}
variable "application_name" {
default = ""
description = "Azure application name tag"
type = string
}
variable "environment" {
default = ""
description = "Environment tag value in Azure"
type = string
validation {
condition = contains(["DEV", "QA", "UAT", "PROD"], var.environment)
error_message = "Environment value should be one among DEV or QA or UAT or PROD."
}
}
variable "loganalytics_sku" {
default = "PerGB2018"
type = string
description = "Specifies the SKU of the Log Analytics Workspace"
validation {
condition = contains(["PerNode", "Premium", "Standard", "Standalone", "Unlimited", "CapacityReservation", "PerGB2018"], var.loganalytics_sku)
error_message = "Log analytics SKU should be one among PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation or PerGB2018 ."
}
}
variable "temporary" {
default = "TRUE"
description = "Temporary tag value in Azure"
type = string
validation {
condition = contains(["TRUE", "FALSE"], upper(var.temporary))
error_message = "The temporary tag value must be either 'TRUE' or 'FALSE'."
}
}