-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
75 lines (70 loc) · 3.27 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
###########################
# Common vars
###########################
variable "environment" {
description = "Variable that defines the name of the environment."
type = string
default = "dev"
}
variable "default_tags" {
description = "A mapping of tags to assign to the resource."
type = map(any)
default = {
"ManagedByTerraform" = "True"
}
}
variable "region" {
description = "Region in which resources are deployed."
type = string
default = "weu"
}
###########################
# Resource groups vars
###########################
variable "resource_group_location" {
description = "Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created."
default = "West Europe"
type = string
}
variable "resource_group_name" {
description = "TThe name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created."
type = string
}
###########################
# Application Insights Service vars
###########################
variable "application_insights_name" {
description = "Specifies the name of the Application Insights component. Changing this forces a new resource to be created."
type = string
}
variable "application_insights_type" {
description = "Specifies the type of Application Insights to create. Valid values are ios for iOS, java for Java web, MobileCenter for App Center, nodejs for Node.js, and other for General."
type = string
default = "web"
validation {
condition = can(regex("^(ios|java|MobileCenter|Node.JS|other|phone|store|web)$", var.application_insights_type))
error_message = "Invalid value for application_insights_type. Valid values are ios, java, MobileCenter, nodejs, or other."
}
}
variable "log_analytics_workspace_name" {
description = "Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created"
type = string
}
variable "log_analytics_workspace_sku" {
description = "Specifies the SKU of the Log Analytics Workspace. Possible values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, and PerGB2018 (new SKU as of 2018-04-03). Defaults to PerGB2018."
type = string
default = "PerGB2018"
validation {
condition = can(regex("^(Free|PerNode|Premium|Standard|Standalone|Unlimited|CapacityReservation|PerGB2018)$", var.log_analytics_workspace_sku))
error_message = "Invalid value for log_analytics_workspace_retention_in_days. Valid values are Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, PerGB2018."
}
}
variable "log_analytics_workspace_retention_in_days" {
description = "The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730."
type = number
default = "30"
validation {
condition = can(regex("^(30|60|90|120|180|270|365|550|730)$", var.log_analytics_workspace_retention_in_days))
error_message = "Invalid value for log_analytics_workspace_retention_in_days. Valid values are 30, 60, 90, 120, 180, 270, 365, 550, 730."
}
}