You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this is a a bug or intended, but I find it annoying that when creating a database resource using exoscale_database, Terraform does not wait for the database to be ready and returns immediately indicating that the resource has been created.
Expected Behavior
I would expect Terraform to return only when the database is available and ready to receive queries.
Steps To Reproduce
Create a database
resource "exoscale_database" "telemetry" {
name = "telemetry"
plan = "hobbyist-2"
zone = "ch-gva-2"
type = "pg"
pg {
version = "16"
ip_filter = ["0.0.0.0/0", "::/0"]
}
}
Provider Version
0.62.1
Terraform Version
OpenTofu v1.8.5
Relevant log output
module.database.exoscale_database.telemetry: Creating...
module.database.exoscale_database.telemetry: Creation complete after 2s [id=telemetry]
The text was updated successfully, but these errors were encountered:
This is the intended behavior as the create and update operations are async.
If you want to make sure the database it's ready you need to use a datasource_uri output and that will wait and return a connection string or credentials when it's ready.
Thanks for clarifying and for providing an alternative.
Is there a specific reason why the exoscale_database resource is created asynchronously? Even so, I would expect the provider to block and poll for the status of the resource and return only when the resource is ready.
We discussed this topic internally. Resource exoscale_database follows our existing practice of completing creation of resource as soon as it is allocated by the orchestrator. Another example is compute instance which will be in state 'starting' when resource creation completes.
We are looking to change this behavior as part of our migration to terraform framework.
Current Behavior
I'm unsure if this is a a bug or intended, but I find it annoying that when creating a database resource using
exoscale_database
, Terraform does not wait for the database to be ready and returns immediately indicating that the resource has been created.Expected Behavior
I would expect Terraform to return only when the database is available and ready to receive queries.
Steps To Reproduce
Create a database
Provider Version
0.62.1
Terraform Version
OpenTofu v1.8.5
Relevant log output
The text was updated successfully, but these errors were encountered: