feat(dns): add validation for cname record-sets (#1019)
relates to #1014 and STACKITTPR-375
This commit is contained in:
parent
82c1d1e644
commit
87bc7415fc
3 changed files with 17 additions and 4 deletions
|
|
@ -132,6 +132,14 @@ func RecordSet() *Validator {
|
|||
))
|
||||
}
|
||||
case "CNAME":
|
||||
name := req.ConfigValue.ValueString()
|
||||
if name == "" || name[len(name)-1] != '.' {
|
||||
resp.Diagnostics.Append(validatordiag.InvalidAttributeValueDiagnostic(
|
||||
req.Path,
|
||||
"value must be a Fully Qualified Domain Name (FQDN) and end with dot '.'",
|
||||
req.ConfigValue.ValueString(),
|
||||
))
|
||||
}
|
||||
case "NS":
|
||||
case "MX":
|
||||
case "TXT":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue