generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
34 lines (29 loc) · 1.51 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
########################################################################################################################
# Input Variables
########################################################################################################################
variable "enterprise_crn" {
type = string
description = "The CRN of the parent Enterprise account to use."
}
variable "enterprise_primary_contact_iam_id" {
type = string
description = "The IAM id of the parent Enterprise account owner."
}
variable "enterprise_accounts" {
description = "List of enterprise child accounts in the enterprise"
type = list(object({ name = string, key_name = string, parent_key_name = optional(string, null), owner_iam_id = optional(string, null), add_owner_iam_policies = optional(bool, false) }))
default = []
validation {
error_message = "Accounts key_name should be unique"
condition = length(distinct(var.enterprise_accounts[*].key_name)) == length(var.enterprise_accounts[*].key_name)
}
}
variable "enterprise_account_groups" {
description = "List of enterprise child account_groups in the enterprise"
type = list(object({ name = string, key_name = string, parent_key_name = optional(string, null), owner_iam_id = optional(string, null) }))
default = []
validation {
error_message = "Account_Groups key_name should be unique"
condition = length(distinct(var.enterprise_account_groups[*].key_name)) == length(var.enterprise_account_groups[*].key_name)
}
}