Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Meertman opened this issue Oct 27, 2023 · 7 comments · Fixed by #2562
Closed

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

Meertman opened this issue Oct 27, 2023 · 7 comments · Fixed by #2562
Assignees
Labels
Class: Resource Module 📦 This is a resource module Needs: Module Owner 📣 This module needs an owner to develop or maintain it Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue

Comments

@Meertman
Copy link

Meertman commented Oct 27, 2023

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
Copy link
Author

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

But it is far from complete.

Important

The "Needs: Triage 🔍" 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
Copy link
Contributor

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

@AlexanderSehr AlexanderSehr added Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Needs: Module Owner 📣 This module needs an owner to develop or maintain it Class: Resource Module 📦 This is a resource module labels Jun 15, 2024

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 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days label Jun 20, 2024
@hundredacres hundredacres removed Needs: Triage 🔍 Maintainers need to triage still Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days labels Jun 20, 2024
@hundredacres
Copy link
Contributor

Working on some tests to validate this functionality.

@hundredacres
Copy link
Contributor

PR here: #2562

AlexanderSehr pushed a commit that referenced this issue Jul 8, 2024
## Description

Add support for geo-replication and a test to validate it's working.

Fixes #2411 
Closes #2411 


## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.cache.redis](https://github.com/hundredacres/bicep-registry-modules/actions/workflows/avm.res.cache.redis.yml/badge.svg?branch=feat%2Fissue%2F2411)](https://github.com/hundredacres/bicep-registry-modules/actions/workflows/avm.res.cache.redis.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [X] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [X] I'm sure there are no other open Pull Requests for the same
update/change
- [X] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [X] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Máté Barabás <barabasmate@gmail.com>
Co-authored-by: Rainer Halanek <61878316+rahalan@users.noreply.github.com>
Co-authored-by: JFolberth <johnfolberth@gmail.com>
@Meertman
Copy link
Author

Meertman commented Jul 9, 2024

@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: Azure/bicep-types-az#1937)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: Resource Module 📦 This is a resource module Needs: Module Owner 📣 This module needs an owner to develop or maintain it Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants