From b655e355d9effaae0355116346e990c740fc0aa2 Mon Sep 17 00:00:00 2001 From: mima Date: Fri, 17 Dec 2021 12:12:04 +0100 Subject: [PATCH] update code docu and fmt --- main.tf | 17 +++++++++++++---- variables.tf | 22 +++++++++++----------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/main.tf b/main.tf index b1f6229..956458b 100644 --- a/main.tf +++ b/main.tf @@ -1,4 +1,11 @@ -# DNS Zone +/** + * # dns + * + * This module manages Azure DNS Zones. + * +*/ + +/** DNS Zone */ resource "azurerm_dns_zone" "dns_zone" { for_each = local.dns_zone @@ -11,6 +18,7 @@ resource "azurerm_dns_zone" "dns_zone" { } } +/** Private DNS Zone */ resource "azurerm_private_dns_zone" "private_dns_zone" { for_each = local.private_dns_zone @@ -23,7 +31,7 @@ resource "azurerm_private_dns_zone" "private_dns_zone" { } } -# A Records +/** DNS A Records */ resource "azurerm_dns_a_record" "dns_a_record" { for_each = local.dns_a_record @@ -38,7 +46,8 @@ resource "azurerm_dns_a_record" "dns_a_record" { tag => local.tags[tag] } } -# alias records to azure resources + +/** DNS Alias Records to Azure Resources */ resource "azurerm_dns_a_record" "dns_a_target" { for_each = local.dns_a_target @@ -54,7 +63,7 @@ resource "azurerm_dns_a_record" "dns_a_target" { } } -# CNAME Records +/** DNS CNAME Records */ resource "azurerm_dns_cname_record" "dns_cname_record" { for_each = local.dns_cname_record diff --git a/variables.tf b/variables.tf index 7cbd8a8..681e9de 100644 --- a/variables.tf +++ b/variables.tf @@ -9,28 +9,28 @@ variable "tags" { } # resource definition variable "dns_zone" { - type = any - default = {} + type = any + default = {} description = "resource definition, default settings are defined within locals and merged with var settings" } variable "private_dns_zone" { - type = any - default = {} + type = any + default = {} description = "resource definition, default settings are defined within locals and merged with var settings" } variable "dns_a_record" { - type = any - default = {} + type = any + default = {} description = "resource definition, default settings are defined within locals and merged with var settings" } variable "dns_a_target" { - type = any - default = {} + type = any + default = {} description = "resource definition, default settings are defined within locals and merged with var settings" } variable "dns_cname_record" { - type = any - default = {} + type = any + default = {} description = "resource definition, default settings are defined within locals and merged with var settings" } @@ -39,7 +39,7 @@ locals { default = { tags = {} # resource definition - dns_zone = {} + dns_zone = {} private_dns_zone = {} dns_a_record = { ttl = "900"