Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domains: Allow for SRV records with port 0. #360

Merged

Conversation

andrewsomething
Copy link
Member

According to RFC 2782, 0 is valid value for port in an SRV reccord:

The port on this target host of this service. The range is 0-65535.

We currently have omitempty set for it which cause 0 to be discarded. Attempting to create a record with 0 for the port results in a 422 error with:

POST https://api.digitalocean.com/v2/domains/foobar-test-terraform-jg0j77x3ee.com/records: 422 Port is not a number and Port Port must be an integer between 0 and 65535

This is required for digitalocean/terraform-provider-digitalocean#475

@bentranter
Copy link
Member

Maybe now I can revert digitalocean/doctl#694 😛

Copy link
Member

@bentranter bentranter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on Slack, this LGTM!

@andrewsomething andrewsomething merged commit 3714c56 into digitalocean:main Aug 6, 2020
@andrewsomething andrewsomething deleted the record-port-omitempty branch August 6, 2020 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants