Skip to content

Latest commit

 

History

History
158 lines (128 loc) · 2.98 KB

oci_mysql_mysql_configurations.md

File metadata and controls

158 lines (128 loc) · 2.98 KB

oci_mysql_mysql_configurations

back

Index

Terraform

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

top

Example Usage

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

  # compartment_id - (required) is a type of string
  compartment_id = null
  # configuration_id - (optional) is a type of string
  configuration_id = null
  # display_name - (optional) is a type of string
  display_name = null
  # shape_name - (optional) is a type of string
  shape_name = null
  # state - (optional) is a type of string
  state = null
  # type - (optional) is a type of list of string
  type = []

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

top

Variables

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

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

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

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

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

variable "type" {
  description = "(optional)"
  type        = list(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_mysql_mysql_configurations" "this" {
  # compartment_id - (required) is a type of string
  compartment_id = var.compartment_id
  # configuration_id - (optional) is a type of string
  configuration_id = var.configuration_id
  # display_name - (optional) is a type of string
  display_name = var.display_name
  # shape_name - (optional) is a type of string
  shape_name = var.shape_name
  # state - (optional) is a type of string
  state = var.state
  # type - (optional) is a type of list 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 "configurations" {
  description = "returns a list of object"
  value       = data.oci_mysql_mysql_configurations.this.configurations
}

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

output "this" {
  value = oci_mysql_mysql_configurations.this
}

top