Skip to content

Commit

Permalink
docs: remove escaping example (#153)
Browse files Browse the repository at this point in the history
Signed-off-by: Kim Oliver Drechsel <kim@drechsel.xyz>
  • Loading branch information
kimdre authored Dec 5, 2024
1 parent 9c86801 commit 9d32355
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/resources/record.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "hetznerdns_record" "example_com_srv" {

- `name` (String) Name of the DNS record to create
- `type` (String) Type of this DNS record ([See supported types](https://docs.hetzner.com/dns-console/dns/general/supported-dns-record-types/))
- `value` (String) The value of the record (e.g. `192.168.1.1`). For TXT records with quoted values, the quotes have to be escaped in Terraform (e.g. `"v=spf1 include:\_spf.google.com ~all"` is represented by `"\\"v=spf1 include:\_spf.google.com ~all\\""` in Terraform)
- `value` (String) The value of the record (e.g. `192.168.1.1`)
- `zone_id` (String) ID of the DNS zone to create the record in.

### Optional
Expand Down
8 changes: 3 additions & 5 deletions internal/provider/record_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ func (r *recordResource) Schema(ctx context.Context, _ resource.SchemaRequest, r
},
},
"value": schema.StringAttribute{
Description: "The value of the record (e.g. 192.168.1.1)",
MarkdownDescription: "The value of the record (e.g. `192.168.1.1`). For TXT records with quoted values, " +
"the quotes have to be escaped in Terraform (e.g. `\"v=spf1 include:\\_spf.google.com ~all\"` is " +
"represented by `\"\\\\\"v=spf1 include:\\_spf.google.com ~all\\\\\"\"` in Terraform)",
Required: true,
Description: "The value of the record (e.g. 192.168.1.1)",
MarkdownDescription: "The value of the record (e.g. `192.168.1.1`)",
Required: true,
Validators: []validator.String{
stringvalidator.LengthAtLeast(1),
},
Expand Down

0 comments on commit 9d32355

Please sign in to comment.