feat(dns): add option to get dns_zone by dns_name (#856)

* feat: add option to get dns_zone by dns_name
This commit is contained in:
Marcel Jacek 2025-05-22 11:06:04 +02:00 committed by GitHub
parent d7b6530b87
commit 913cc1415e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 159 additions and 43 deletions

View file

@ -36,10 +36,10 @@ resource "stackit_dns_zone" "zone" {
expire_time = var.expire_time
is_reverse_zone = var.is_reverse_zone
# negative_cache = var.negative_cache
primaries = var.primaries
refresh_time = var.refresh_time
retry_time = var.retry_time
type = var.type
primaries = var.primaries
refresh_time = var.refresh_time
retry_time = var.retry_time
type = var.type
}
@ -62,6 +62,11 @@ data "stackit_dns_zone" "zone" {
zone_id = stackit_dns_zone.zone.zone_id
}
data "stackit_dns_zone" "zone_name" {
project_id = var.project_id
dns_name = stackit_dns_zone.zone.dns_name
}
data "stackit_dns_record_set" "record_set" {
project_id = var.project_id
zone_id = stackit_dns_zone.zone.zone_id

View file

@ -29,6 +29,11 @@ data "stackit_dns_zone" "zone" {
zone_id = stackit_dns_zone.zone.zone_id
}
data "stackit_dns_zone" "zone_name" {
project_id = var.project_id
dns_name = stackit_dns_zone.zone.dns_name
}
data "stackit_dns_record_set" "record_set" {
project_id = var.project_id
zone_id = stackit_dns_zone.zone.zone_id