terraform-provider-ibm
terraform-provider-ibm copied to clipboard
ibm_database_connection has incomplete/confusing attributes
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
- ibm_database (resource/data source)
- ibm_database_connection (data source)
The ibm_database resource has deprecated the connectionstrings attribute, to replace with ibm_database_connection. The attributes of this data source are at best confusing, or at worst incomplete. Many of the supported databases are missing or require the lookup under an a different attribute. mongo, mysql, postres are clearly identifiable, rediss has extraneous s, whilst etcd, elasticsearch and enterprise db can be found under other attributes.
It would be nice to have a consistent, approved way of generating a data connection configuration following the creation of database.
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please share a link to the ZIP file.
data "ibm_database_connection" "database_connection" {
endpoint_type = var.service_endpoints
deployment_id = ibm_database.db.id
user_id = ibm_database.db.adminuser
user_type = "database"
}
Debug Output
Panic Output
Expected Behavior
Able to identify database connection with admin or user account for passing to further configuration and/or applications.
Actual Behavior
Database connection may be in the attributes, but where?
Steps to Reproduce
Important Factoids
References
- #0000