Skip to content

Latest commit

 

History

History
118 lines (92 loc) · 2 KB

oci_database_backup_destinations.md

File metadata and controls

118 lines (92 loc) · 2 KB

oci_database_backup_destinations

back

Index

Terraform

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

top

Example Usage

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

  # compartment_id - (required) is a type of string
  compartment_id = null
  # type - (optional) is a type of string
  type = null

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

top

Variables

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

variable "type" {
  description = "(optional)"
  type        = string
  default     = null
}

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_database_backup_destinations" "this" {
  # compartment_id - (required) is a type of string
  compartment_id = var.compartment_id
  # type - (optional) is a type of string
  type = var.type

  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 "backup_destinations" {
  description = "returns a list of object"
  value       = data.oci_database_backup_destinations.this.backup_destinations
}

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

output "this" {
  value = oci_database_backup_destinations.this
}

top