You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"digitalocean_domain""main" {
name ="example.com"
}
resource"digitalocean_record""srv" {
domain = digitalocean_domain.main.name
type ="SRV"
name ="_caldav._tcp"
priority =0
weight =0
port =0
value ="@"
ttl =3600
}
Expected Behavior
The DNS SRV record should be created with the valid value of 0 for the port number, subject to the domain being created successfully.
Actual Behavior
The terraform configuration is hard stopped by the following error, and an apply does not happen:
Error: expected port to be in the range (1 - 65535), got 0
on dns.tf line 5, in resource "digitalocean_record" "srv":
5: resource "digitalocean_record" "srv" {
Steps to Reproduce
Run a terraform plan against the example Terraform Configuration file.
Important Factoids
A port number of 0 is a valid in an SRV record as per RFC 2782, and using a 0 for the port number works both over the Digital Ocean API and web interface successfully.
For a Digital Ocean API example, first create a valid domain, then run the following with the domain field updated and your own token in place of my redacted token (I have formatted the output for better legibility):
Terraform Version
Affected Resource(s)
digitalocean_record
Terraform Configuration Files
Expected Behavior
The DNS SRV record should be created with the valid value of 0 for the port number, subject to the domain being created successfully.
Actual Behavior
The terraform configuration is hard stopped by the following error, and an apply does not happen:
Steps to Reproduce
terraform plan
against the example Terraform Configuration file.Important Factoids
A port number of
0
is a valid in an SRV record as per RFC 2782, and using a0
for the port number works both over the Digital Ocean API and web interface successfully.For a Digital Ocean API example, first create a valid domain, then run the following with the domain field updated and your own token in place of my redacted token (I have formatted the output for better legibility):
References
Digital Ocean API - https://developers.digitalocean.com/documentation/v2/#create-a-new-domain-record
RFC 2782 - https://tools.ietf.org/html/rfc2782
The text was updated successfully, but these errors were encountered: