Azure Managed Redis Deployment Automation
This PowerShell script addresses temporary capacity restrictions when deploying Azure Managed Redis. It attempts to create an Azure Managed Redis cache repeatedly, handling failed deployments due to capacity issues by deleting the failed resource and retrying. The script allows for multiple SKU attempts, random delays between retries, and customization of various cache configurations. These include high availability, clustering policy, eviction policy, and geo-replication settings. The script has minimal requirements, needing only PowerShell v7.6.5 or above and the Az.Accounts and Az.Resources modules. It can be run using default values, by providing parameters on the command line, or interactively. Parameters are prioritized in the order of defaults, command line, and interactive input. The script validates all provided values and may prompt for missing or incorrect information. It supports creating caches with or without geo-replication, defining eviction policies, and specifying clustering policies. Authentication to Azure is required, with appropriate RBAC roles needed at the subscription or resource group level. The script generates a log file for all outputs.