InstanceTemplate should be usable in all selected zones.

Hello,
I have a managed instance group, and when i want add more than 3 nodes, i have this error :

gcloud compute instance-groups managed resize mig_name --size=4 --region=europe-west1
ERROR: (gcloud.compute.instance-groups.managed.resize) Could not fetch resource:
- Invalid value for field 'size': '4'. InstanceTemplate should be usable in all selected zones.

In my instance template, i tried to remove :

  • statefull disk
  • change machine type
  • change distribution_policy_target_shape (ANY, BALANCED , same result)
  • add all my zones in distribution_policy_zones
  • change regional or zonal instance template
  • activate instance redistribution

Thanks

2 Likes

Hello @ValentinBouin ,Welcome on Google Cloud Community.

Are you able to provide your Template config ? It might be possible that due to lack of support for either Network / HW or Disk config in one of your zone, you are getting such error.
You can use the gcloud compute machine-types list --zone ZONE command to see available machine types in each zone

–
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

1 Like

Hello, thank you for your answer. Finally I found, I used google console and gcloud cli, but the message was not complete. With terraform :
β”‚ Reason: invalid, Message: Invalid value for field β€˜size’: β€˜4’. The instance template cannot be used to create more than one instance per zone in the instance group. This is because the instance template has attached a disk definition with a custom disk name and only one disk with a specific name can exist in a zone. To create more than one instance, set the name of the disk to instance name or Autogenerated

So, i remove the name of my statefull disk, and now all it’s good !
Thanks

1 Like