edit:
I realized this was a configuration error, I happened to be providing a bad value for postgresql_default_privilegesowner. Report filed for posterity.
I would suggest attempting to improve the error message in this case "role becore_admin_super does not exist" maybe with a trace of "caused by ... (existing error)", that would have been more useful to me than "XY problem, caused by: sql result set empty"
│ Error: could not check if role becore_admin_super is superuser: sql: no rows in result set
│ with postgresql_default_privileges.main,
│ on terraform.tf line 201, in resource "postgresql_default_privileges" "main":
│ 201: resource "postgresql_default_privileges" "main" {
Terraform Version
Terraform v1.4.2
on linux_amd64
+ provider registry.terraform.io/cyrilgdn/postgresql v1.18.0
Affected Resource(s)
Please list the resources as a list, for example:
postgresql_default_privileges
Issue only observed with postgresql_default_privileges, issue repro'd on a conventional postgres database (eg testing against https://hub.docker.com/_/postgres )
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
I originally interpreted this error to be a limitation of aws rds postgres, (as this was the "detail" that changed between testing on docker and deploying live), however the issue was actually that terraform was initialized with a a module dependency from git, which has since been patched to rename owner field (that role is created by the same module when the user supplies a password, however the user was supplying a password for a now-nonexistent role, rather than the renamed role)
this was ultimately resolved by clearing terraform module cache, eg terraform get -update or rm -r .terraform/; terraform init
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
edit: I realized this was a configuration error, I happened to be providing a bad value for
postgresql_default_privileges
owner
. Report filed for posterity.I would suggest attempting to improve the error message in this case "role becore_admin_super does not exist" maybe with a trace of "caused by ... (existing error)", that would have been more useful to me than "XY problem, caused by: sql result set empty"
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
Issue only observed with
postgresql_default_privileges
, issue repro'd on a conventional postgres database (eg testing against https://hub.docker.com/_/postgres )Terraform Configuration Files
Debug Output
omitted due to user-error
Expected Behavior
What should have happened?
a user-facing "bad configuration" message
Actual Behavior
What actually happened?
a technical-facing "XY" message
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
I originally interpreted this error to be a limitation of aws rds postgres, (as this was the "detail" that changed between testing on docker and deploying live), however the issue was actually that terraform was initialized with a a module dependency from git, which has since been patched to rename
owner
field (that role is created by the same module when the user supplies a password, however the user was supplying a password for a now-nonexistent role, rather than the renamed role)this was ultimately resolved by clearing terraform module cache, eg
terraform get -update
orrm -r .terraform/; terraform init
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
no.