This commit is contained in:
2023-07-24 17:16:12 +02:00
parent 0c85a7c63f
commit 8fe267118c
2 changed files with 36 additions and 35 deletions

View File

@@ -27,14 +27,14 @@ locals {
},[for z in var.zones: { },[for z in var.zones: {
"${z.name}" = join("\n", concat([ "${z.name}" = join("\n", concat([
"$TTL 60", "$TTL 60",
"$ORIGIN ${z["name"]}.", "$ORIGIN ${z.name}.",
local.soa-ns local.soa-ns
], ],
[for k,v in z["hosts"]: format("%s IN A %s", k, v)], [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.hosts6: format("%s IN AAAA %s", k, v)],
[for k,v in z["alias"]: format("%s IN CNAME %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.wildcard!=""?[format("*.%s. IN A %s", z.name, z.wildcard)]:[],
z["wildcard6"]!=""?[format("*.%s. IN AAAA %s", z.namz, z.wildcard6)]:[], z.wildcard6!=""?[format("*.%s. IN AAAA %s", z.namz, z.wildcard6)]:[],
)) ))
}]...) }]...)
} }

View File

@@ -6,30 +6,6 @@ metadata:
name: dns name: dns
description: null description: null
options: 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: image:
default: default:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@@ -59,11 +35,6 @@ options:
default: 1.10.1 default: 1.10.1
type: string type: string
type: object type: object
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
domain: domain:
default: your-company default: your-company
examples: examples:
@@ -74,6 +45,35 @@ options:
examples: examples:
- dns - dns
type: string 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: [] dependencies: []
providers: providers:
kubernetes: true kubernetes: true
@@ -82,3 +82,4 @@ providers:
postgresql: null postgresql: null
restapi: null restapi: null
http: null http: null
tfaddtype: true