Skip to content

Latest commit

 

History

History
126 lines (99 loc) · 2.1 KB

oci_audit_events.md

File metadata and controls

126 lines (99 loc) · 2.1 KB

oci_audit_events

back

Index

Terraform

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

top

Example Usage

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

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

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

top

Variables

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

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

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

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

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

output "this" {
  value = oci_audit_events.this
}

top