back
terraform {
required_providers {
oci = ">= 4.21.0"
}
}
top
module "oci_identity_auth_tokens" {
source = "./modules/oci/d/oci_identity_auth_tokens"
# user_id - (required) is a type of string
user_id = null
filter = [{
name = null
regex = null
values = []
}]
}
top
variable "user_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
data "oci_identity_auth_tokens" "this" {
# user_id - (required) is a type of string
user_id = var.user_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 "id" {
description = "returns a string"
value = data.oci_identity_auth_tokens.this.id
}
output "tokens" {
description = "returns a list of object"
value = data.oci_identity_auth_tokens.this.tokens
}
output "this" {
value = oci_identity_auth_tokens.this
}
top