back
terraform {
required_providers {
exoscale = ">= 0.23.0"
}
}
top
module "exoscale_domain_record" {
source = "./modules/exoscale/d/exoscale_domain_record"
# domain - (required) is a type of string
domain = null
filter = [{
content_regex = null
id = null
name = null
record_type = null
}]
}
top
variable "domain" {
description = "(required) - Domain of the Record"
type = string
}
variable "filter" {
description = "nested block: NestingList, min items: 1, max items: 1"
type = set(object(
{
content_regex = string
id = number
name = string
record_type = string
}
))
}
top
data "exoscale_domain_record" "this" {
# domain - (required) is a type of string
domain = var.domain
dynamic "filter" {
for_each = var.filter
content {
# content_regex - (optional) is a type of string
content_regex = filter.value["content_regex"]
# id - (optional) is a type of number
id = filter.value["id"]
# name - (optional) is a type of string
name = filter.value["name"]
# record_type - (optional) is a type of string
record_type = filter.value["record_type"]
}
}
}
top
output "id" {
description = "returns a string"
value = data.exoscale_domain_record.this.id
}
output "records" {
description = "returns a list of object"
value = data.exoscale_domain_record.this.records
}
output "this" {
value = exoscale_domain_record.this
}
top