From 8fe267118cb1f956b9e816f5b87940531f4a1aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Mon, 24 Jul 2023 17:16:12 +0200 Subject: [PATCH] fix --- share/dns/config.tf | 12 ++++----- share/dns/index.yaml | 59 ++++++++++++++++++++++---------------------- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/share/dns/config.tf b/share/dns/config.tf index 6f08a06..cbb56b3 100644 --- a/share/dns/config.tf +++ b/share/dns/config.tf @@ -27,14 +27,14 @@ locals { },[for z in var.zones: { "${z.name}" = join("\n", concat([ "$TTL 60", - "$ORIGIN ${z["name"]}.", + "$ORIGIN ${z.name}.", local.soa-ns ], - [for k,v in z["hosts"]: format("%s IN A %s", k, v)], - [for k,v in z["hosts6"]: format("%s IN AAAA %s", k, v)], - [for k,v in z["alias"]: format("%s IN CNAME %s", k, v)], - z["wildcard"]!=""?[format("*.%s. IN A %s", z.name, z.wildcard)]:[], - z["wildcard6"]!=""?[format("*.%s. IN AAAA %s", z.namz, z.wildcard6)]:[], + [for k,v in z.hosts: format("%s IN A %s", k, v)], + [for k,v in z.hosts6: format("%s IN AAAA %s", k, v)], + [for k,v in z.alias: format("%s IN CNAME %s", k, v)], + z.wildcard!=""?[format("*.%s. IN A %s", z.name, z.wildcard)]:[], + z.wildcard6!=""?[format("*.%s. IN AAAA %s", z.namz, z.wildcard6)]:[], )) }]...) } diff --git a/share/dns/index.yaml b/share/dns/index.yaml index 8d1fc88..0229622 100644 --- a/share/dns/index.yaml +++ b/share/dns/index.yaml @@ -6,30 +6,6 @@ metadata: name: dns description: null options: - zones: - default: [] - items: - properties: - alias: - default: {} - type: object - hosts: - default: {} - type: object - hosts6: - default: {} - type: object - name: - default: local.domain - type: string - wildcard: - default: '' - type: string - wildcard6: - default: '' - type: string - type: object - type: array image: default: pullPolicy: IfNotPresent @@ -59,11 +35,6 @@ options: default: 1.10.1 type: string type: object - domain-name: - default: your_company.com - examples: - - your_company.com - type: string domain: default: your-company examples: @@ -74,6 +45,35 @@ options: examples: - dns type: string + zones: + default: [] + items: + properties: + alias: + default: {} + type: object + hosts: + default: {} + type: object + hosts6: + default: {} + type: object + name: + default: local.domain + type: string + wildcard: + default: '' + type: string + wildcard6: + default: '' + type: string + type: object + type: array + domain-name: + default: your_company.com + examples: + - your_company.com + type: string dependencies: [] providers: kubernetes: true @@ -82,3 +82,4 @@ providers: postgresql: null restapi: null http: null +tfaddtype: true