-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathvariables.tf
67 lines (56 loc) · 2.24 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
variable "ibmcloud_api_key" {
type = string
description = "The IBM Cloud API Token"
sensitive = true
}
variable "prefix" {
type = string
description = "Prefix name for all related resources"
}
variable "resource_tags" {
type = list(string)
description = "Optional list of tags to be added to created resources"
default = []
}
variable "access_tags" {
type = list(string)
description = "Optional list of access tags to be added to the created resources"
default = []
}
# region needs to provide cross region support.
variable "region" {
description = "Region where resources will be created"
type = string
validation {
condition = can(regex("us-south|eu-de|jp-tok", var.region))
error_message = "Variable 'region' must be 'us-south' or 'eu-de', or 'jp-tok'. The encryption key must be created in a high availability key protect instance for cross region object storage"
}
}
variable "cross_region_location" {
description = "Specify the cross-regional bucket location. Supported values are 'us', 'eu', and 'ap'."
type = string
default = "us"
validation {
condition = can(regex("us|eu|ap", var.cross_region_location))
error_message = "Variable 'cross_region_location' must be 'us' or 'eu', or 'ap'."
}
}
variable "single_site_location" {
type = string
description = "Specify the single site bucket location. If you pass a value for this, ensure to set the value of var.region and var.cross_region_location to null."
default = "ams03"
validation {
condition = var.single_site_location == null || can(regex("ams03|mil01|mon01|par01|sjc04|sng01|che01", var.single_site_location))
error_message = "Variable 'cross_region_location' must be 'ams03', 'mil01', 'mon01', 'par01', 'sjc04', 'sng01', 'che01' or 'null'."
}
}
variable "management_endpoint_type_for_bucket" {
type = string
description = "The type of endpoint for the IBM terraform provider to use to manage the bucket. (public, private, direct)"
default = "public"
}
variable "resource_group" {
type = string
description = "An existing resource group name to use for this example, if unset a new resource group will be created"
default = null
}