Azure / bicep-registry-modules

Bicep registry modules
MIT License
473 stars 331 forks source link

[Feature Request]: Enable geo-replication for Redis cache. #2411

Closed Meertman closed 2 months ago

Meertman commented 11 months ago

Description

A Redis cache supports the setup of geo-replication via bicep through the use of the linked server bicep resource: https://learn.microsoft.com/en-us/azure/templates/microsoft.cache/redis/linkedservers?pivots=deployment-language-bicep

Adding this to the bicep module for deployment of a Redis cache would be a welcome addition.

However the usage of the linked server and a private endpoint proves to be a bit difficult as you cannot add a private link to a Redis cache that is geo-replicated. You first need to remove the geo-replication, then add the link and then re-enable the geo-replication. As documented here: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-geo-replication

Specifically:

Private links can't be added to caches that are already geo-replicated. To add a private link to a geo-replicated cache: 1. Unlink the geo-replication. 2. Add a Private Link. 3. Last, relink the geo-replication.

Meertman commented 11 months ago

I've tried to provide some kind of start of an implementation here: https://github.com/Azure/ResourceModules/compare/main...Meertman:ResourceModules:main

But it is far from complete.

microsoft-github-policy-service[bot] commented 3 months ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

AlexanderSehr commented 3 months ago

Hey @hundredacres, I just migrated this issue over from CARML. Please take a look and triage if still relevant :)

microsoft-github-policy-service[bot] commented 3 months ago

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

[!TIP]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!
hundredacres commented 3 months ago

Working on some tests to validate this functionality.

hundredacres commented 3 months ago

PR here: https://github.com/Azure/bicep-registry-modules/pull/2562

Meertman commented 2 months ago

@hundredacres, does this also work with private endpoints enabled? In the past I ran into issues with this? (and even created a GitHub issue on bicep for this: https://github.com/Azure/bicep-types-az/issues/1937)