Update resman modules (#475)
* Make logging sinks in different resources use the same API * Split resman modules in multiple files. Add nullables where applicable
This commit is contained in:
@@ -30,12 +30,14 @@ variable "contacts" {
|
||||
description = "List of essential contacts for this resource. Must be in the form EMAIL -> [NOTIFICATION_TYPES]. Valid notification types are ALL, SUSPENSION, SECURITY, TECHNICAL, BILLING, LEGAL, PRODUCT_UPDATES"
|
||||
type = map(list(string))
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "custom_roles" {
|
||||
description = "Map of role name => list of permissions to create in this project."
|
||||
type = map(list(string))
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "descriptive_name" {
|
||||
@@ -48,18 +50,21 @@ variable "group_iam" {
|
||||
description = "Authoritative IAM binding for organization groups, in {GROUP_EMAIL => [ROLES]} format. Group emails need to be static. Can be used in combination with the `iam` variable."
|
||||
type = map(list(string))
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "iam" {
|
||||
description = "IAM bindings in {ROLE => [MEMBERS]} format."
|
||||
type = map(list(string))
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "iam_additive" {
|
||||
description = "IAM additive bindings in {ROLE => [MEMBERS]} format."
|
||||
type = map(list(string))
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "iam_additive_members" {
|
||||
@@ -72,6 +77,7 @@ variable "labels" {
|
||||
description = "Resource labels."
|
||||
type = map(string)
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "lien_reason" {
|
||||
@@ -84,6 +90,7 @@ variable "logging_exclusions" {
|
||||
description = "Logging exclusions for this project in the form {NAME -> FILTER}."
|
||||
type = map(string)
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "logging_sinks" {
|
||||
@@ -97,13 +104,22 @@ variable "logging_sinks" {
|
||||
# TODO exclusions also support description and disabled
|
||||
exclusions = map(string)
|
||||
}))
|
||||
default = {}
|
||||
validation {
|
||||
condition = alltrue([
|
||||
for k, v in(var.logging_sinks == null ? {} : var.logging_sinks) :
|
||||
contains(["bigquery", "logging", "pubsub", "storage"], v.type)
|
||||
])
|
||||
error_message = "Type must be one of 'bigquery', 'logging', 'pubsub', 'storage'."
|
||||
}
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "metric_scopes" {
|
||||
description = "List of projects that will act as metric scopes for this project."
|
||||
type = list(string)
|
||||
default = null
|
||||
default = []
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
@@ -121,12 +137,15 @@ variable "oslogin_admins" {
|
||||
description = "List of IAM-style identities that will be granted roles necessary for OS Login administrators."
|
||||
type = list(string)
|
||||
default = []
|
||||
nullable = false
|
||||
|
||||
}
|
||||
|
||||
variable "oslogin_users" {
|
||||
description = "List of IAM-style identities that will be granted roles necessary for OS Login users."
|
||||
type = list(string)
|
||||
default = []
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "parent" {
|
||||
@@ -143,6 +162,7 @@ variable "policy_boolean" {
|
||||
description = "Map of boolean org policies and enforcement value, set value to null for policy restore."
|
||||
type = map(bool)
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "policy_list" {
|
||||
@@ -153,7 +173,8 @@ variable "policy_list" {
|
||||
status = bool
|
||||
values = list(string)
|
||||
}))
|
||||
default = {}
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "prefix" {
|
||||
@@ -216,6 +237,7 @@ variable "shared_vpc_host_config" {
|
||||
enabled = false
|
||||
service_projects = []
|
||||
}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "shared_vpc_service_config" {
|
||||
@@ -228,6 +250,7 @@ variable "shared_vpc_service_config" {
|
||||
attach = false
|
||||
host_project = ""
|
||||
}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "skip_delete" {
|
||||
|
||||
Reference in New Issue
Block a user