Open riptl opened 3 years ago
Odd... Does the instance group actually have an instance named after the empty-state per instance config? The result from the API being empty seems to indicate that the instance group does not do anything with the per-instance-config.
I don't see a way to handle this in the provider given how the API does not include the instance in the result of listPerInstanceConfigs
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
When applying this, the provider makes two calls:
/compute/beta/projects/xxx/regions/us-central1/instanceGroupManagers/alertmanager-us-central1/createInstances
/compute/beta/projects/xxx/regions/us-central1/instanceGroupManagers/alertmanager-us-central1/listPerInstanceConfigs
https://gist.github.com/terorie/4502ebca06aa73d5eb316b49498d0767
Expected Behavior
Apply completes.
Actual Behavior
Error: Provider produced inconsistent result after apply
Steps to Reproduce
terraform apply
Important Factoids
The per-instance config returned by
/listPerInstanceConfigs
is an empty object{}
ifpreserved_state
is empty.This behavior is wanted in a rare circumstance when instances in a MIG are supposed to have stable names but are still stateless.
Apply works when specifying some data inside
preserved_state
, such as a dummymetadata
value, presumably because thepreserved_state
is not an empty object.This leads me to believe that the provider handles empty objects erroneously.
References