hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.25k stars 1.7k forks source link

Spanner Autoscaling #16888

Open Vin-ch opened 6 months ago

Vin-ch commented 6 months ago

I have a Google Spanner Instance and databases in my project, While trying to update the code with autoscaling config I was unable to update the existing instance. error message: Error 400: cannot update an instance or instance partition that does not have an existing autoscaling config.

danxmoran commented 5 months ago

I'm also hitting this problem

danxmoran commented 5 months ago

I opened #16983 as a bug for this and https://github.com/GoogleCloudPlatform/magic-modules/pull/9814 as a fix

Sankalp951 commented 3 months ago

Hi @Vin-ch

The error message suggests that you're trying to update a Google Spanner instance without an existing autoscaling configuration. To resolve this, please try to check below.

  1. Check if an autoscaling configuration is already set up for your instance. You can use cloud console or data sources (_google_spannerinstance) in Terraform to retrieve the current configuration.
  2. Create: If not, create an autoscaling configuration either through the Google Cloud Console or Terraform.
  3. Update: Associate the autoscaling configuration with your instance.
  4. Retry: After ensuring the configuration is set up correctly, retry updating the instance with autoscaling settings.

This can help to fix your issue. Please let me know how it goes ?

Thank you. Sankalp