Skip to content

Latest commit

 

History

History
117 lines (91 loc) · 1.93 KB

oci_kms_key_versions.md

File metadata and controls

117 lines (91 loc) · 1.93 KB

oci_kms_key_versions

back

Index

Terraform

terraform {
  required_providers {
    oci = ">= 4.21.0"
  }
}

top

Example Usage

module "oci_kms_key_versions" {
  source = "./modules/oci/d/oci_kms_key_versions"

  # key_id - (required) is a type of string
  key_id = null
  # management_endpoint - (required) is a type of string
  management_endpoint = null

  filter = [{
    name   = null
    regex  = null
    values = []
  }]
}

top

Variables

variable "key_id" {
  description = "(required)"
  type        = string
}

variable "management_endpoint" {
  description = "(required)"
  type        = string
}

variable "filter" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      name   = string
      regex  = bool
      values = list(string)
    }
  ))
  default = []
}

top

Datasource

data "oci_kms_key_versions" "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

  dynamic "filter" {
    for_each = var.filter
    content {
      # name - (required) is a type of string
      name = filter.value["name"]
      # regex - (optional) is a type of bool
      regex = filter.value["regex"]
      # values - (required) is a type of list of string
      values = filter.value["values"]
    }
  }

}

top

Outputs

output "id" {
  description = "returns a string"
  value       = data.oci_kms_key_versions.this.id
}

output "key_versions" {
  description = "returns a list of object"
  value       = data.oci_kms_key_versions.this.key_versions
}

output "this" {
  value = oci_kms_key_versions.this
}

top