generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
91 lines (78 loc) · 3.08 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
##############################################################################
# Common variables
##############################################################################
variable "resource_group_id" {
type = string
description = "The resource group ID where resources will be provisioned."
}
variable "region" {
description = "The region to provision the App Configuration service, valid regions are us-south, us-east, eu-gb, and au-syd."
type = string
default = "us-south"
validation {
condition = contains(["us-east", "us-south", "eu-gb", "au-syd"], var.region)
error_message = "Value for region must be one of the following: ${join(", ", ["us-east", "us-south", "eu-gb", "au-syd"])}"
}
}
########################################################################################################################
# App Config Instance Variables
########################################################################################################################
variable "app_config_name" {
type = string
description = "Name for the App Configuration service instance"
}
variable "app_config_plan" {
type = string
description = "Plan for the App Configuration service instance, valid plans are lite, standardv2, and enterprise."
default = "lite"
validation {
condition = contains(["lite", "standardv2", "enterprise"], var.app_config_plan)
error_message = "Value for plan must be one of the following: \"lite\", \"standardv2\", or \"enterprise\"."
}
}
variable "app_config_service_endpoints" {
type = string
description = "Service Endpoints for the App Configuration service instance, valid endpoints are public or public-and-private."
default = "public-and-private"
validation {
condition = contains(["public", "public-and-private"], var.app_config_service_endpoints)
error_message = "Value for service endpoints must be one of the following: \"public\" or \"public-and-private\"."
}
}
variable "app_config_tags" {
type = list(string)
description = "Optional list of tags to be added to the App Config instance."
default = []
}
variable "app_config_collections" {
description = "A list of collections to be added to the App Configuration instance"
type = list(object({
name = string
collection_id = string
description = optional(string, null)
tags = optional(string, null)
}))
default = []
}
##############################################################
# Context-based restriction (CBR)
##############################################################
variable "cbr_rules" {
type = list(object({
description = string
account_id = string
tags = optional(list(object({
name = string
value = string
})), [])
rule_contexts = list(object({
attributes = optional(list(object({
name = string
value = string
}))) }))
enforcement_mode = string
}))
description = "The list of context-based restriction rules to create."
default = []
# Validation happens in the rule module
}