Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- If an issue is assigned to a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Terraform Version & Provider Version(s)
Terraform v1.5.7
on linux_amd65
- provider registry.terraform.io/hashicorp/google v5.35.0
Affected Resource(s)
google_storage_bucket_object
Terraform Configuration
data "archive_file" "source_code" {
type = "zip"
source_dir = var.source_code_path
output_path = "artifacts/function.zip"
}
resource "google_storage_bucket_object" "zip" {
source = data.archive_file.source_code.output_path
content_type = "application/zip"
name = "src-${var.cloud_function_name}.zip"
bucket = var.cloud_function_storage_bucket_name
depends_on = [
data.archive_file.source_code
]
}
where vars are like:
"source_code_path" = "./scripts/cloud-functions/obtain_raw_data"
"cloud_function_name" = "obtain_raw_data"
"cloud_function_storage_bucket_name" = "data_loader_functions_ddj"
Debug Output
No response
Expected Behavior
Update can be applied
Actual Behavior
Intermittently, the following error happens
When expanding the plan for
│ module.cloud_function_v2_load_data_to_reltio.google_storage_bucket_object.zip
│ to include new values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/google" produced an invalid new value for
│ .detect_md5hash: was cty.StringVal("different hash"), but now
│ cty.StringVal("4UjkMfXUHVjzvgP+c6d0/w==").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
To resolve as a work around, I have commented out the resources and re-added them after an intermediate deployment.
Steps to reproduce
terraform plan
(runs successfully)terraform apply
Important Factoids
In the terraform plan, for the resource with the issue, I see the following:
# module.cloud_function_v2_transform_data.google_storage_bucket_object.zip will be updated in-place
~ resource "google_storage_bucket_object" "zip" {
~ detect_md5hash = "W9SGSTCuO8E7doWdvGkgLA==" -> "different hash"
id = "data_loader_functions_obd-src-transform_raw_data.zip"
name = "src-transform_raw_data.zip"
# (12 unchanged attributes hidden)
}
I have seen this twice with the terraform provider 5.35.0. When I have downgraded, and run ~6 updates, I do not see this happen. With it being intermittent, it is hard to fully test.
References
No response
b/355702274