back
terraform {
required_providers {
oci = ">= 4.21.0"
}
}
top
module "oci_database_db_homes" {
source = "./modules/oci/d/oci_database_db_homes"
# backup_id - (optional) is a type of string
backup_id = null
# compartment_id - (required) is a type of string
compartment_id = null
# db_system_id - (optional) is a type of string
db_system_id = null
# db_version - (optional) is a type of string
db_version = null
# display_name - (optional) is a type of string
display_name = null
# state - (optional) is a type of string
state = null
# vm_cluster_id - (optional) is a type of string
vm_cluster_id = null
filter = [{
name = null
regex = null
values = []
}]
}
top
variable "backup_id" {
description = "(optional)"
type = string
default = null
}
variable "compartment_id" {
description = "(required)"
type = string
}
variable "db_system_id" {
description = "(optional)"
type = string
default = null
}
variable "db_version" {
description = "(optional)"
type = string
default = null
}
variable "display_name" {
description = "(optional)"
type = string
default = null
}
variable "state" {
description = "(optional)"
type = string
default = null
}
variable "vm_cluster_id" {
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
data "oci_database_db_homes" "this" {
# backup_id - (optional) is a type of string
backup_id = var.backup_id
# compartment_id - (required) is a type of string
compartment_id = var.compartment_id
# db_system_id - (optional) is a type of string
db_system_id = var.db_system_id
# db_version - (optional) is a type of string
db_version = var.db_version
# display_name - (optional) is a type of string
display_name = var.display_name
# state - (optional) is a type of string
state = var.state
# vm_cluster_id - (optional) is a type of string
vm_cluster_id = var.vm_cluster_id
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
output "db_homes" {
description = "returns a list of object"
value = data.oci_database_db_homes.this.db_homes
}
output "id" {
description = "returns a string"
value = data.oci_database_db_homes.this.id
}
output "this" {
value = oci_database_db_homes.this
}
top