generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
86 lines (72 loc) · 3.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
##############################################################################
# Required input variables
##############################################################################
variable "region" {
type = string
description = "The region in which the secrets-manager instance exists."
}
variable "secrets_manager_guid" {
type = string
description = "The GUID of the secrets-manager instance."
}
##############################################################################
# Optional input variables
##############################################################################
variable "iam_secret_generator_service_id_name" {
type = string
description = "Optionally override the name of the Service ID that will be created to configure the secrets-manager IAM secret engine. If null, the default value will be \"sid:0.0.1:$${secrets_manager_name}-iam-secret-generator:automated:simple-service:secret-manager:\""
default = null
}
variable "iam_secret_generator_apikey_name" {
type = string
description = "Name of ServiceID API Key to be created for Secrets Manager IAM Secret engine"
default = "iam-secret-generator-apikey"
}
variable "iam_secret_generator_apikey_description" {
type = string
description = "Description of ServiceID API Key to be created for Secrets Manager IAM Secret engine"
default = "ServiceID API Key to be created for Secrets Manager IAM Secret engine"
}
variable "new_secret_group_name" {
type = string
description = "The name of a new secret group to create. This is the group that the Service ID (used to configure IAM secret engine) apikey secret will be added to. Ignored if value passed for var.existing_secret_group_id."
default = "account-secret-group"
}
variable "existing_secret_group_id" {
type = string
description = "The ID of an existing secret group that the Service ID (used to configure IAM secret engine) apikey secret will be added to. If null, a new group is created using the value in var.new_secret_group_name."
default = null
}
variable "iam_secret_generator_apikey_secret_name" {
type = string
description = "Name of the secret to add to secrets-manager which contains the ServiceID API Key"
default = "iam-secret-generator-apikey-secret"
}
variable "iam_secret_generator_apikey_secret_labels" {
type = list(string)
description = "Labels of the secret to create. Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled brackets (<>), comma (,), colon (:), ampersand (&), and vertical pipe character (|)."
default = []
validation {
condition = (length(var.iam_secret_generator_apikey_secret_labels) <= 30) && (length(var.iam_secret_generator_apikey_secret_labels) > 0 ? can([for label in var.iam_secret_generator_apikey_secret_labels : regex("^[^<>,:&|]{2,30}$", label)]) : true)
error_message = "Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled brackets (<>), comma (,), colon (:), ampersand (&), and vertical pipe character (|)."
}
}
variable "display_iam_secret_generator_apikey" {
type = bool
description = "Set to true to display the iam_secret_generator_apikey serviceID API Key in output. Should only be used by account admins."
default = false
}
variable "endpoint_type" {
type = string
description = "The endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private`"
default = "public"
validation {
condition = contains(["public", "private"], var.endpoint_type)
error_message = "The specified endpoint_type is not a valid selection!"
}
}
variable "iam_engine_name" {
type = string
description = "The name of the IAM Engine to create."
}
##############################################################################