/** * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ variable "iam" { description = "Keyring IAM bindings in {ROLE => [MEMBERS]} format." type = map(list(string)) default = {} nullable = false } variable "iam_bindings" { description = "Authoritative IAM bindings in {KEY => {role = ROLE, members = [], condition = {}}}. Keys are arbitrary." type = map(object({ members = list(string) role = string condition = optional(object({ expression = string title = string description = optional(string) })) })) nullable = false default = {} } variable "iam_bindings_additive" { description = "Keyring individual additive IAM bindings. Keys are arbitrary." type = map(object({ member = string role = string condition = optional(object({ expression = string title = string description = optional(string) })) })) nullable = false default = {} } variable "import_job" { description = "Keyring import job attributes." type = object({ id = string import_method = string protection_level = string }) default = null } variable "keyring" { description = "Keyring attributes." type = object({ location = string name = string }) } variable "keyring_create" { description = "Set to false to manage keys and IAM bindings in an existing keyring." type = bool default = true } variable "keys" { description = "Key names and base attributes. Set attributes to null if not needed." type = map(object({ rotation_period = optional(string) labels = optional(map(string)) purpose = optional(string, "ENCRYPT_DECRYPT") skip_initial_version_creation = optional(bool, false) version_template = optional(object({ algorithm = string protection_level = optional(string, "SOFTWARE") })) iam = optional(map(list(string)), {}) iam_bindings = optional(map(object({ members = list(string) role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) iam_bindings_additive = optional(map(object({ member = string role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) })) default = {} nullable = false } variable "project_id" { description = "Project id where the keyring will be created." type = string } variable "tag_bindings" { description = "Tag bindings for this keyring, in key => tag value id format." type = map(string) default = {} nullable = false }