Closed brianhelba closed 3 days ago
Ping @andrewsomething.
@brianhelba I've raised the issue regarding override_main_response_version
internally. In the meantime, I've just cut a new release that should workaround the issue by not sending the unnecessary options in the request.
Thanks for all the feedback!
@andrewsomething Thanks again!
I've confirmed that #1273 fixes this bug for me.
Bug Report
Describe the bug
When performing change actions,
digitalocean_database_opensearch_config
sends HTTP requests with many unnecessary options.This is especially impactful, since sending the particular option
override_main_response_version
triggers an unrelated upstream bug within DigitalOcean OpenSearch, whereby the database version is misreported, which disrupts usage of the relateddigitalocean_database_cluster
.Affected Resource(s)
digitalocean_database_opensearch_config
digitalocean_database_cluster
(indirectly)Expected Behavior
For the change from the resource:
to
I would expect an HTTP request like:
Actual Behavior
Instead, in response to this change,
terraform apply
makes an HTTP request like:Terraform version
Terraform v1.9.8
Additional context
Note that all of the additional keys sent have the default value (except the changed
action_auto_create_index_enabled
in my example). Normally, this should be harmless but unnecessary extra data.However, DigitialOcean ElasticSearch currently has a behavior (which seems like a bug) whereby setting the config option
"override_main_response_version": false
(which is already the default value!) causes the reportedversion
of a v2 database to be"1"
. For a resource managed withdigitalocean_database_cluster
, this will forever cause Terraform to attempt (unsuccessfully) to change theversion
from1
to2
, causing all future plans to show required changes for thedigitalocean_database_cluster
.If only a minimal set of changes is actually passed to the HTTP PATCH request, users can better workaround this upstream bug by avoiding explicit usage of the
override_main_response_version
option until the behavior is fixed upstream.Separately, note that any key with a value of
0
is omitted from the request. Maybe this is an extension of the bug withfalse
values addressed in #1268? This seems like it's an additional bug, but it's not the focus of my bug report here.References
1268