Hi.
There is some flaky issue when creating PostgreSQL databases and users via DO provider. Please see attached minimal proof-of-concept.
Terraform complains with the following message:
Error: Provider produced inconsistent result after apply
When applying changes to digitalocean_database_user.db-user, provider
"registry.terraform.io/-/digitalocean" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Terraform v0.12.19
User and database should be successfully created.
I'm no sure, but it seems that user's and database's meta information is not put in a state file. Actual resources is mostly created in a cloud.
Please unzip attached POC, then
$ export TF_VAR_do_token=your-token
$ export TF_VAR_pg_cluser_name=your_pg_cluster_name
$ ./test.sh
POC:
do_bug.zip
@lukoyanov apologies you hit this and thanks for reporting.
I checked with the team and they believe this is due to a caching issue our E2E tests recently surfaced. They're already working on a fix! I'll keep you posted as it progresses.
I have also faced this issue
We disabled caching here back on Feb 2nd.
@lukoyanov @ivanov-aleksander @rfleschenberg have any of you ran into this since then?
@eddiezane just tried to run a test create-destroy loop and it seems that bug is still there.
I've got the same error:
Error: Provider produced inconsistent result after apply
When applying changes to digitalocean_database_db.db, provider
"registry.terraform.io/-/digitalocean" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Failed to provision infrastructure, retrying...
Please check out my attached do_bug.zip archive which contains create-drop test script.
I've got an error after 8 successful create-destroy iterations.
We disabled caching here back on Feb 2nd.
@lukoyanov @ivanov-aleksander @rfleschenberg have any of you ran into this since then?
I didn't, but I didn't have the opportunity to try since then.
Does anyone in DO working on this?
My deployment automation is broken for more then a month and now i'm heading over to some ugly curl workarounds :-(
@lukoyanov just an update here.
We've got a fix that should be rolling out this week. I've been running your test script in a loop all morning and it hasn't failed.
@lukoyanov the fix should be in production now. Thanks for your patience and please reopen if you still experience this.