Open wreulicke opened 1 year ago
I am not sure, but I faced this error when updating deletetion_policy for resources after import.
@wreulicke after you imported the resource, you are supposed to update the config to match the imported state. If a diff is detected, that means you probably need to update the config again. If this is not the case, could you please share your state and your updated ocnfig?
@edwardmedia
resource "google_firebase_web_app" "app" {
provider = google-beta
project = local.project
display_name = "xxxxxxxxxx"
deletion_policy = "DELETE"
}
resource "google_firebase_web_app" "app" {
provider = google-beta
project = local.project
display_name = "xxxxxxxxxx"
deletion_policy = "ABANDON" => "DELETE"
}
updateMask
The deletion_poicy
is a virtual field.
So, I expected that terraform provider doesn't call to firebase API.
Or, I expected that terraform provider call the API without any errors.
Hi, Firebaser here! I was able to reproduce this issue. You are right:
Nonetheless, if you just update deletion_policy
, it will be applied to Terraform state despite the error from Firebase API. You can confirm this by terraform plan
again and it will show no diff. Since deletion_policy
is a virtual field, that's all that's needed.
I see where the problem. Let me open a PR for it. Thanks for reporting the issue. @wreulicke @rainshen49
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
error: https://gist.github.com/wreulicke/a7a37a2680f080b2f465252a69b1e7ef
Panic Output
none
Expected Behavior
The update is successful correctly.
Actual Behavior
The update is done without any errors.
Steps to Reproduce
terraform import google_firebase_web_app.app {{name}}
terraform apply
Then, have this difference.Important Factoids
I added
displayName
toupdateMask
and tried the API with API explorer. Then, it is successful.And also, I tried the api without
updateMask
. The same error was reproduced.References