Fix bug dns record name inconsistent (#307)

* add fqdn to model, map fqdn in mapFields

* add testing

* update examples, generate docs, fix linting

* addressed comments in PR

* add comment to acc tests, explaining ignore

* update docs
This commit is contained in:
Diogo Ferrão 2024-03-25 11:45:29 +00:00 committed by GitHub
parent 7223a5244c
commit d6c677552f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 61 additions and 18 deletions

View file

@ -34,6 +34,7 @@ data "stackit_dns_record_set" "example" {
- `active` (Boolean) Specifies if the record set is active or not.
- `comment` (String) Comment.
- `error` (String) Error shows error in case create/update/delete failed.
- `fqdn` (String) Fully qualified domain name (FQDN) of the record set.
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`zone_id`,`record_set_id`".
- `name` (String) Name of the record which should be a valid domain according to rfc1035 Section 2.3.4. E.g. `example.com`
- `records` (List of String) Records.

View file

@ -16,7 +16,7 @@ DNS Record Set Resource schema.
resource "stackit_dns_record_set" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
zone_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-record-set.www.example-zone.com"
name = "example-record-set"
type = "A"
comment = "Example comment"
records = ["1.2.3.4"]
@ -43,6 +43,7 @@ resource "stackit_dns_record_set" "example" {
### Read-Only
- `error` (String) Error shows error in case create/update/delete failed.
- `fqdn` (String) Fully qualified domain name (FQDN) of the record set.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`zone_id`,`record_set_id`".
- `record_set_id` (String) The rr set id.
- `state` (String) Record set state.

View file

@ -16,7 +16,7 @@ DNS Zone resource schema.
resource "stackit_dns_zone" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "Example zone"
dns_name = "www.example-zone.com"
dns_name = "example-zone.com"
contact_email = "aa@bb.ccc"
type = "primary"
acl = "192.168.0.0/24"