back
terraform {
required_providers {
oci = ">= 4.21.0"
}
}
top
module "oci_kms_key_version" {
source = "./modules/oci/r/oci_kms_key_version"
# key_id - (required) is a type of string
key_id = null
# management_endpoint - (required) is a type of string
management_endpoint = null
# time_of_deletion - (optional) is a type of string
time_of_deletion = null
timeouts = [{
create = null
delete = null
update = null
}]
}
top
variable "key_id" {
description = "(required)"
type = string
}
variable "management_endpoint" {
description = "(required)"
type = string
}
variable "time_of_deletion" {
description = "(optional)"
type = string
default = null
}
variable "timeouts" {
description = "nested block: NestingSingle, min items: 0, max items: 0"
type = set(object(
{
create = string
delete = string
update = string
}
))
default = []
}
top
resource "oci_kms_key_version" "this" {
# key_id - (required) is a type of string
key_id = var.key_id
# management_endpoint - (required) is a type of string
management_endpoint = var.management_endpoint
# time_of_deletion - (optional) is a type of string
time_of_deletion = var.time_of_deletion
dynamic "timeouts" {
for_each = var.timeouts
content {
# create - (optional) is a type of string
create = timeouts.value["create"]
# delete - (optional) is a type of string
delete = timeouts.value["delete"]
# update - (optional) is a type of string
update = timeouts.value["update"]
}
}
}
top
output "compartment_id" {
description = "returns a string"
value = oci_kms_key_version.this.compartment_id
}
output "id" {
description = "returns a string"
value = oci_kms_key_version.this.id
}
output "is_primary" {
description = "returns a bool"
value = oci_kms_key_version.this.is_primary
}
output "key_version_id" {
description = "returns a string"
value = oci_kms_key_version.this.key_version_id
}
output "public_key" {
description = "returns a string"
value = oci_kms_key_version.this.public_key
}
output "replica_details" {
description = "returns a list of object"
value = oci_kms_key_version.this.replica_details
}
output "restored_from_key_id" {
description = "returns a string"
value = oci_kms_key_version.this.restored_from_key_id
}
output "restored_from_key_version_id" {
description = "returns a string"
value = oci_kms_key_version.this.restored_from_key_version_id
}
output "state" {
description = "returns a string"
value = oci_kms_key_version.this.state
}
output "time_created" {
description = "returns a string"
value = oci_kms_key_version.this.time_created
}
output "time_of_deletion" {
description = "returns a string"
value = oci_kms_key_version.this.time_of_deletion
}
output "vault_id" {
description = "returns a string"
value = oci_kms_key_version.this.vault_id
}
output "this" {
value = oci_kms_key_version.this
}
top