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
Assigning database cluster resource's port to an SRV record's port does not seem to work. #670
Comments
Thanks for reporting this @aphistic! It looks like we're doing validation inside of a terraform-provider-digitalocean/digitalocean/resource_digitalocean_record.go Lines 118 to 154 in 4fdccb6
|
Ahh, interesting! I guess I'm glad there's actually a bug and that you already know what's happening and it's not just something I did wrong. :) |
Bug Report
Describe the bug
I'm trying to create a
digitalocean_record
SRV record that references one of my newly provisioned database clusters (done in the same plan/apply) by pointing thedigitalocean_database_cluster
'sport
output to thedigitalocean_record
'sport
field but when I try to do aterraform plan
it tells me "'port' is required for when type is 'SRV'".Affected Resource(s)
Expected Behavior
I'd expect the SRV record to have the database cluster's port value after the cluster has been provisioned.
Actual Behavior
Terraform gives me the following error:
Steps to Reproduce
digitalocean_database_cluster
resource.digitalocean_record
resource with typeSRV
and the port referencing the database cluster's port.terraform plan
Terraform Configuration Files
Debug Output
https://gist.github.com/aphistic/f6c6f36e9d699d6c3649e8e85efb9526
Additional context
When troubleshooting I also tried to set the
digitalocean_record
's to a static value of1234
and that worked fine. When I changed it back to use theport
field from the database cluster it failed with the same error message again.The text was updated successfully, but these errors were encountered: