Error : reserved_ip_range issue in google_redis_instance resources

I'm trying to create a Memorystore Redis instance using google_redis_instance . I’m getting the error message below, even though the IP ranges (/29) I’m using fall within the pre-configured private service access range at vpc level.

Github bugs link -

https://github.com/hashicorp/terraform-provider-google/pull/13958

As per tracker, it has been already fixed in google provider version 4.58.0

https://github.com/hashicorp/terraform-provider-google/releases/tag/v4.58.0

Error message :

Error creating Instance: googleapi: Error 400: com.google.apps.framework.request.StatusException: generic::INVALID_ARGUMENT: Field instance.reserved_ip_range must match the name of an allocated IP address range associated with the private service connection.

Can anyone please help on this. 

My current provider & terraform version details :

Terraform version - 1.7.0

Google provider version - 5.30.0

 

1 3 265
3 REPLIES 3

Hello  @Sanjoydey993 ,Welcome on Google Cloud Community.

It's hard to debug without your piece of TF code 🙂 Did you've maybe used this example and you are sure, that reserved_ip_range is correct? : https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/redis_instance#exampl...

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

Hello @DamianS 

Yes, the IP range I'm providing is correct. When I don't specify the IP range, it defaults to a /29 IP range from the same pre-configured private service access range.

Additionally, I'm using the Google-managed Terraform module."

https://github.com/terraform-google-modules/terraform-google-memorystore/blob/master/main.tf

Thanks, 

Sanioy

Hello GCP Community, 

Can anyone please help to resolve this issue. 

Thanks, 

Sanjoy