Closed pjohnmeyer closed 1 month ago
Hey @pjohnmeyer, names containing hyphens only work for the instance name but not the database name and database user. Both have been configured to follow a specific pattern, otherwise, names containing hyphens will have to be escaped.
Previews
Having the ability to use hyphens would be nice for consistency though!
Thanks @lexara-prime-ai -- so what you're telling me is this is at least consistent with the UI? I'll confess I didn't try the UI.
So, maybe not an issue with the TF provider, but a limitation (intentional or otherwise) of the API.
I'll leave this open until I hear from somebody @render-oss but, point taken.
Yes @pjohnmeyer, I experienced the same issue a lot when I was working on render_cdk
, since uses the Render API extensively. We automated name generation and noticed tests kept failing for situations where names contained hyphens.
Hopefully someone from the @render-oss team can help clarify this.
Thanks for chiming in here @lexara-prime-ai. You're correct that this is a requirement across the board and not specific to the Terraform provider. If you'd like to make the request to add support for hyphens, opening one at https://feedback.render.com would be best the place.
When creating:
The plan was successful, but "apply" failed with the error:
The workaround was to use an underscore, but our working standard is to use hyphens.
PostgreSQL database usernames can definitely include hyphens, we use them in non-Render environments. So unless there's a reason Render doesn't allow hyphens in usernames, I would prefer to see them be allowed. (If it's a provider issue I wouldn't mind trying to submit a fix myself.)