-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoints service incorrectly generates config_id #10164
Comments
It looks like The fix for this should be a diff suppress func to ignore changes to the grpc_config field if the content is identical. @adambabik is the rendered content literally exactly the same or does it have meaningless formatting changes? |
@melinath in my case the rendered content is exactly the same. What changes are the resources the rendered content depends on but not really the actual values used by it. For example, |
@adambabik I'm able to reproduce this bug in Terraform 1.0+. It looks like template_file is only recommended for tf <0.11. In my testing, using templatefile resolves the issue in 1.0.X. Does that work for you as well? |
@melinath I run only a very simple check but it works as expected now with |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
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
Terraform v1.0.7
on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
I am providing only relevant fragment:
Expected Behavior
When running
terraform apply
, it renders the following plan related to the problematic endpoints service:It's important to notice that the dependency of
google_endpoints_service
, i.e.template_file.api_config
detects a change too becausegoogle_cloud_run_service.gateway
changes, however, the rendered content itself does not change.The config_id in this case should not change because there are no changes that would result in a new revision.
The apply command should succeed.
Actual Behavior
The apply command fails because the Endpoints Service returns the old config_id while the provider thinks it should be updated:
Steps to Reproduce
terraform apply
Important Factoids
I believe this might be related to
grpc_config = data.template_file.api_config.rendered
and the fact that the provider cannot determine whether the content of it will result in a new config_id or not. On the other hand, the content does not change at all but it seems not to be verified by the provider.It's important to notice that a consecutive call of
terraform apply
will succeed and bring back the config_id value to the previous one.The text was updated successfully, but these errors were encountered: