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.34k stars 1.75k forks source link

When updating google_apigee_developer, an error occurs, preventing the Apigee developer from being updated #20226

Open paullexandre51 opened 1 week ago

paullexandre51 commented 1 week ago

Community Note

Terraform Version & Provider Version(s)

Terraform v1.9.8 on linux_amd64

Affected Resource(s)

google_apigee_developer

Terraform Configuration

resource "google_apigee_developer" "main" {
  for_each   = local.apim_devs
  org_id     = data.terraform_remote_state.apigee.outputs.org_id
  email      = each.value.email
  first_name = each.value.first_name
  last_name  = each.value.last_name
  user_name  = each.value.user_name

dynamic "attributes" {
     for_each = try(each.value["attributes"], [])
     content {
       name  = attributes.value.name
       value = attributes.value.value
     }
   }

Debug Output

No response

Expected Behavior

The Apigee Developer should be updated.

Actual Behavior

googleapi: Error 400: Invalid JSON payload received. Unknown name "updateMask": Cannot bind query parameter. Field 'updateMask' could not be found in request message. │ Details: │ [ │ { │ "@type": "type.googleapis.com/google.rpc.BadRequest", │ "fieldViolations": [ │ { │ "description": "Invalid JSON payload received. Unknown name \"updateMask\": Cannot bind query parameter. Field 'updateMask' could not be found in request message." │ } │ ] │ } │ ]

Steps to reproduce

  1. terraform init
  2. terraform apply

Important Factoids

No response

References

No response

b/379172536

ggtisc commented 20 hours ago

Confirmed issue when trying to update an existing google_apigee_developer resource arguments it returns the following error:

Error: Error updating Developer "organizations/my-project/developers/my-user@my-domain.com": googleapi: Error 400: Invalid JSON payload received. Unknown name "updateMask": Cannot bind query parameter. Field 'updateMask' could not be found in request message.
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.BadRequest",
│     "fieldViolations": [
│       {
│         "description": "Invalid JSON payload received. Unknown name \"updateMask\": Cannot bind query parameter. Field 'updateMask' could not be found in request message."
│       }
│     ]
│   }
│ ]
│ 
│   with google_apigee_developer.apigee_developer_20226,
│   on main.tf line 60, in resource "google_apigee_developer" "apigee_developer_20226":
│   60: resource "google_apigee_developer" "apigee_developer_20226" {

Example used link