-
Notifications
You must be signed in to change notification settings - Fork 283
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
Creating PostgreSQL DBs and users still fails randomly #493
Comments
same issue when creating a mysql cluster and db users. |
Having similar errors when creating/ deleting databases and users within an existing cluster. Any update on this? |
It is still happening to me when I create MongoDB database users using list and for_each. I use provider 2.19.0, terraform 1.1.4, and terragrunt 0.36.0. |
Happening here too for Postgres DBs on provider v2.21.0 terraform v1.1.9. |
I just started getting this issue randomly.. resource "digitalocean_database_cluster" "saas" {
name = var.cluster_name
engine = "mysql"
version = "8"
size = "db-s-1vcpu-1gb"
region = var.region
node_count = 1
private_network_uuid = digitalocean_vpc.saas.id
}
resource "digitalocean_database_user" "saas" {
cluster_id = digitalocean_database_cluster.saas.id
name = "saas-user"
mysql_auth_plugin = "mysql_native_password"
}
resource "digitalocean_database_db" "saas" {
cluster_id = digitalocean_database_cluster.saas.id
name = "saas"
} And I get this error: digitalocean_database_db.saas: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to digitalocean_database_db.saas, provider
│ "provider[\"registry.terraform.io/digitalocean/digitalocean\"]" produced an
│ unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ ow No other clues as to what could be causing this - one minute it worked. Next minute it doesn't :( terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.0"
}
}
} |
We are also experiencing this on Postgres and the last version of the provider (2.25.2). |
I've also managed to reproduce this. So in order to have higher chances you may need to create multiple users at the same So as a workaround I suggest to implement few retries with some delays:
|
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Terraform v0.13.3
Affected Resource(s)
Please list the resources as a list, for example:
opc_instance
opc_storage_volume
digitalocean_database_cluster
digitalocean_database_user
digitalocean_database_database
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
When the resources get created, I sometimes get the following error:
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
What should have happened?
The resources get created without fail.
Actual Behavior
What actually happened?
The resource creation sometimes throws the above error. I think this might be some kind of race condition? Because when I check manually in the UI, everything has been created and looks fine.
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?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: