Open alvintownsend opened 5 years ago
The exact same problem is happening with me. By any chances, did you manage to fix it?
Error: Error issuing create request for Redis Cache XXXXXXXX (resource group XXXXX): redis.Client#Create: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="The requested update to the resource is not permitted. The following properties(s) cannot be modified: 'properties.subnet'.```
Our Goal is automate the provisioning of a Redis Cache using IaC (e.g. Terraform and/or ARM templates) that is in compliance with our regulatory and governance structure.
For this particular case, the defect can be reproduced by creating a Redis Cache that:
The above can be created from Portal but it fails when the same config is performed through Terraform/ARM scripts.
The scripts used are found below.
The error message received suggests that it is not possible to modify a Redis Cache when it is deployed in a VNET:
Please note, some variable and instance names have been changed as to not reveal the client for which we are working, it's possible they don't line up perfectly since we did a few quick search and replaces.
The following snippet of Terraform script, shows how to create a Redis Cache and configure the Diagnostic Logs: