hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.33k stars 1.73k forks source link

google_memcache_instance: allow for updates to memcache_parameters.params field #9297

Open jcanseco opened 3 years ago

jcanseco commented 3 years ago

Community Note

Description

The google_memcache_instance resource has a memcache_parameters.params field which cannot be updated. Attempts to update this field results in the following API error:

googleapi: Error 400: The update mask is empty
com.google.apps.framework.request.StatusException: <eye3 title='INVALID_ARGUMENT'/> generic::INVALID_ARGUMENT: The update mask is empty
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.BadRequest",
    "fieldViolations": [
      {
        "description": "Invalid value: ",
        "field": "update_mask"
      }
    ]
  }
], detail:

The Terraform resource's Update function does not seem to touch the field at all.

However, from the API docs, it seems that the field should be updateable using the updateParameters and applyParameters methods.

New or Affected Resource(s)

References

rileykarson commented 3 years ago

Terraform returning a bad update message here is a bug, and we can likely resolve it by making the field updatable. If it's resolved w/o doing so, we can re-classify this issue as an enhancement again.

jcanseco commented 3 years ago

Hi @rileykarson. To clarify, did you mean "if the request is not resolved without making the field updateable, then we can re-classify the issue as an enhancement"?

To answer this question: the customer does seem to want to be able to update the field since it is a use-case supported by the UI. I am not entirely sure if it is a use-case that is feasible to implement in Terraform given that updating parameters seem to be a special operation, but I linked to some API docs above that might allow it to be possible.

rileykarson commented 3 years ago

Close! "If the request is resolved without making the field updateable, then we can re-classify the issue as an enhancement"

We made this a bug because Terraform should never return that error message

jcanseco commented 3 years ago

Gotcha I see :)