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
Creation of a new digitalocean_database_opensearch_config fails.
Affected Resource(s)
digitalocean_database_opensearch_config
Steps to Reproduce
With a resource definition like:
resource"digitalocean_database_opensearch_config""elasticsearch" {
cluster_id=digitalocean_database_cluster.elasticsearch.id# Adding additional optional arguments does not change the failing behavior
}
creation via terraform apply fails with the error (unique identifiers are redacted with xxxx):
│ Error: Error updating Opensearch configuration: PATCH https://api.digitalocean.com/v2/databases/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/config: 422 (request "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") the mask must be set with which fields are being updated
Running TF_LOG=DEBUG terraform apply shows that the HTTP API request to DigitialOcean is:
with a response (some non-essential headers redacted):
---[ RESPONSE ]--------------------------------------
HTTP/2.0 422 Unprocessable Entity
Content-Length: 151
Content-Type: application/json; charset=utf-8
Server: cloudflare
SameSite=None
{
"message": "the mask must be set with which fields are being updated",
"id": "unprocessable_entity",
"request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
As noted above, adding additional optional arguements to the digitalocean_database_opensearch_config resource does not change the behavior: the underlying HTTP request still sends a PATCH with an empty config in the body.
Workaround
Import of a digitalocean_database_opensearch_config still succeeds. Since the underlying DigialOcean resource always already exists (it's created along with the database cluster), performing a Terraform import prevents the resource from failing on future applies.
Terraform version
Terraform v1.9.8
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. I can reproduce the initial error you mentioned, and have a fix in #1268
As noted above, adding additional optional arguements to the digitalocean_database_opensearch_config resource does not change the behavior: the underlying HTTP request still sends a PATCH with an empty config in the body.
Though I have not been able to reproduce this. Could you share an example config that you saw this for?
Bug Report
Describe the bug
Creation of a new
digitalocean_database_opensearch_config
fails.Affected Resource(s)
digitalocean_database_opensearch_config
Steps to Reproduce
With a resource definition like:
creation via
terraform apply
fails with the error (unique identifiers are redacted withxxxx
):Running
TF_LOG=DEBUG terraform apply
shows that the HTTP API request to DigitialOcean is:with a response (some non-essential headers redacted):
As noted above, adding additional optional arguements to the
digitalocean_database_opensearch_config
resource does not change the behavior: the underlying HTTP request still sends a PATCH with an emptyconfig
in the body.Workaround
Import of a
digitalocean_database_opensearch_config
still succeeds. Since the underlying DigialOcean resource always already exists (it's created along with the database cluster), performing a Terraform import prevents the resource from failing on future applies.Terraform version
Terraform v1.9.8
The text was updated successfully, but these errors were encountered: