Skip to content

Commit 85bb62c

Browse files
authored
Version 1.0.0 (#1)
* update LICENSE * update .gitignore * add devcontainer and pre-commit * fix devcontainer * add FUNDING * add dependabot * update workflows * add terraform-docs * update module core, add readme basic and .markdownlint.yml * remove .markdownlint.yml * update pre-commit and devcontainer * add changelog * add tests * update markdownlint * update terraform resource names * last tests * add docs of tests
1 parent cd50a36 commit 85bb62c

39 files changed

+1687
-670
lines changed

.config/.terraform-docs.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
formatter: markdown
2+
3+
settings:
4+
anchor: false
5+
html: false
6+
7+
sort:
8+
enabled: false
9+
10+
output:
11+
file: README.md
12+
mode: inject
13+
14+
content: |
15+
{{ define "table" }}{{ printf "The `%s` supports the following:" .Resource }}
16+
17+
| Name | Description | Type | Default | Required |
18+
| ---- | ------------| :--: | :-----: | :------: |
19+
{{ range include .File | fromJson -}}
20+
{{ print "|" (.Name | sanitizeMarkdownTbl) -}}
21+
{{ $z := len .Support }}{{ if ne $z 0 }}{{ print "|" .Description -}}
22+
{{ range $x, $y := .Support -}}
23+
{{ if eq $x (sub $z 1) }}{{ printf " `%s`." . -}}
24+
{{ else if eq $x (sub $z 2) }}{{ printf " `%s` and" . -}}
25+
{{ else }}{{ printf " `%s`," . }}{{ end -}}
26+
{{ end -}}
27+
{{ else }}{{ print "|" .Description }}{{ end -}}
28+
{{ printf "|`%s`" .Type -}}
29+
{{ if eq .Default "n/a" }}{{ print "|" (.Default | sanitizeMarkdownTbl) -}}
30+
{{ else }}{{ printf "|`%s`" .Default }}{{ end -}}
31+
{{ printf "|%s|" .Required }}
32+
{{ end }}{{ end -}}
33+
34+
## Parameters
35+
36+
The following parameters are supported:
37+
38+
| Name | Description | Type | Default | Required |
39+
| ---- | ----------- | :--: | :-----: | :------: |
40+
{{ range .Module.Inputs -}}
41+
{{ print "|" (.Name | sanitizeMarkdownTbl) -}}
42+
{{ print "|" (toString .Description | sanitizeMarkdownTbl) -}}
43+
{{ if eq (substr 0 13 (toString .Type)) "list(object({" }}{{ print "|`list(object({}))`" -}}
44+
{{ else if eq (substr 0 8 (toString .Type)) "object({" }}{{ print "|`object({})`" -}}
45+
{{ else }}{{ printf "|`%s`" .Type }}{{ end -}}
46+
{{ if eq .GetValue "" }}{{ print "|" (.GetValue | sanitizeMarkdownTbl) -}}
47+
{{ else }}{{ printf "|`%s`" .GetValue }}{{ end -}}
48+
{{ print "|" (ternary .Required "yes" "no") "|" }}
49+
{{ end }}{{ printf "\n" -}}
50+
51+
{{ template "table" dict "Resource" "soa_record" "File" ".config/soa_record_parameters.json" }}
52+
{{ template "table" dict "Resource" "a_records" "File" ".config/a_record_parameters.json" }}
53+
{{ template "table" dict "Resource" "aaaa_records" "File" ".config/aaaa_record_parameters.json" }}
54+
{{ template "table" dict "Resource" "cname_records" "File" ".config/cname_record_parameters.json" }}
55+
{{ template "table" dict "Resource" "mx_records" "File" ".config/mx_record_parameters.json" }}
56+
{{ template "table" dict "Resource" "mx_records.records" "File" ".config/mx_records_record_parameters.json" }}
57+
{{ template "table" dict "Resource" "ptr_records" "File" ".config/ptr_record_parameters.json" }}
58+
{{ template "table" dict "Resource" "srv_records" "File" ".config/srv_record_parameters.json" }}
59+
{{ template "table" dict "Resource" "srv_records.records" "File" ".config/srv_records_record_parameters.json" }}
60+
{{ template "table" dict "Resource" "txt_records" "File" ".config/txt_record_parameters.json" }}
61+
{{ template "table" dict "Resource" "virtual_network_links" "File" ".config/virtual_network_link_parameters.json" }}{{ printf "\n" -}}
62+
63+
## Outputs
64+
65+
The following outputs are exported:
66+
67+
| Name | Description | Sensitive |
68+
| ---- | ------------| :-------: |
69+
{{ range .Module.Outputs -}}
70+
{{ print "|" .Name -}}
71+
{{ print "|" (toString .Description | sanitizeMarkdownTbl) -}}
72+
{{ print "|" (ternary .Sensitive "yes" "no") "|" }}
73+
{{ end -}}

.config/a_record_parameters.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "name",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "ttl",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "records",
28+
"Description": "",
29+
"Type": "list(string)",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]

.config/aaaa_record_parameters.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "name",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "ttl",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "records",
28+
"Description": "",
29+
"Type": "list(string)",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]

.config/cname_record_parameters.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "name",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "ttl",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "record",
28+
"Description": "",
29+
"Type": "string",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]

.config/mx_record_parameters.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "name",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "ttl",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "records",
28+
"Description": "",
29+
"Type": "list(object({}))",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"Name": "preference",
4+
"Description": "",
5+
"Type": "number",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "exchange",
12+
"Description": "",
13+
"Type": "string",
14+
"Default": "n/a",
15+
"Required": "no",
16+
"Support": []
17+
}
18+
]

.config/ptr_record_parameters.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "name",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "ttl",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "records",
28+
"Description": "",
29+
"Type": "list(string)",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]

.config/soa_record_parameters.json

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[
2+
{
3+
"Name": "email",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "expire_time",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "null",
23+
"Required": "no",
24+
"Support": []
25+
},
26+
{
27+
"Name": "minimum_ttl",
28+
"Description": "",
29+
"Type": "number",
30+
"Default": "null",
31+
"Required": "no",
32+
"Support": []
33+
},
34+
{
35+
"Name": "refresh_time",
36+
"Description": "",
37+
"Type": "number",
38+
"Default": "null",
39+
"Required": "no",
40+
"Support": []
41+
},
42+
{
43+
"Name": "retry_time",
44+
"Description": "",
45+
"Type": "number",
46+
"Default": "null",
47+
"Required": "no",
48+
"Support": []
49+
},
50+
{
51+
"Name": "ttl",
52+
"Description": "",
53+
"Type": "number",
54+
"Default": "null",
55+
"Required": "no",
56+
"Support": []
57+
}
58+
]

.config/srv_record_parameters.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "name",
4+
"Description": "",
5+
"Type": "string",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "tags",
12+
"Description": "",
13+
"Type": "map(string)",
14+
"Default": "null",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "ttl",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "records",
28+
"Description": "",
29+
"Type": "list(object({})",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[
2+
{
3+
"Name": "priority",
4+
"Description": "",
5+
"Type": "number",
6+
"Default": "n/a",
7+
"Required": "yes",
8+
"Support": []
9+
},
10+
{
11+
"Name": "weight",
12+
"Description": "",
13+
"Type": "number",
14+
"Default": "n/a",
15+
"Required": "no",
16+
"Support": []
17+
},
18+
{
19+
"Name": "port",
20+
"Description": "",
21+
"Type": "number",
22+
"Default": "n/a",
23+
"Required": "yes",
24+
"Support": []
25+
},
26+
{
27+
"Name": "target",
28+
"Description": "",
29+
"Type": "string",
30+
"Default": "n/a",
31+
"Required": "yes",
32+
"Support": []
33+
}
34+
]

0 commit comments

Comments
 (0)