Skip to content

Latest commit

 

History

History
108 lines (83 loc) · 1.79 KB

oci_metering_computation_queries.md

File metadata and controls

108 lines (83 loc) · 1.79 KB

oci_metering_computation_queries

back

Index

Terraform

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

top

Example Usage

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

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

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

top

Variables

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

Outputs

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

output "query_collection" {
  description = "returns a list of object"
  value       = data.oci_metering_computation_queries.this.query_collection
}

output "this" {
  value = oci_metering_computation_queries.this
}

top