-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
avm/res/cache/redis
: add support for AKV secrets export (#4138)
## Description Closes #4137 Add support for AKV secrets export by introducing a new `secretsExportConfiguration` input param as per https://azure.github.io/Azure-Verified-Modules/specs/bcp/res/interfaces/#secrets-export. In addition to the primary and secondary access key, I also added support for connection strings in the form `rediss://...`, which is supported by most Redis clients: - [Lettuce](https://github.com/redis/lettuce/wiki/Redis-URI-and-connection-details) - [Jedis](https://redis.io/docs/latest/develop/clients/jedis/connect/) - [node-redis](https://github.com/redis/node-redis/blob/master/docs/client-configuration.md#createclient-configuration) - [redis-py](https://redis-py.readthedocs.io/en/stable/connections.html#redis.Redis.from_url) | Secret key name | Secret value | |--------|--------| | `secretsExportConfiguration.primaryAccessKeyName` | Primary access key | | `secretsExportConfiguration.primaryConnectionStringName` | TLS-enabled primary connection string in [Redis URI form](https://www.iana.org/assignments/uri-schemes/prov/rediss): `rediss://:<primaryaccesskey>@<hostname>:6380` | | `secretsExportConfiguration.secondaryAccessKeyName` | Secondary access key | | `secretsExportConfiguration.secondaryConnectionStringName` | TLS-enabled secondary connection string in [Redis URI form](https://www.iana.org/assignments/uri-schemes/prov/rediss): `rediss://:<secondaryaccesskey>@<hostname>:6380` | Usage example: ```bicep module redis 'br/public:avm/res/cache/redis:<version>' = { name: 'redisDeployment' params: { // Required parameters name: 'kvref' // Non-required parameters location: '<location>' secretsExportConfiguration: { keyVaultResourceId: '<keyVaultResourceId>' primaryAccessKeyName: 'custom-primaryAccessKey-name' primaryConnectionStringName: 'custom-primaryConnectionString-name' secondaryAccessKeyName: 'custom-secondaryAccessKey-name' secondaryConnectionStringName: 'custom-secondaryConnectionString-name' } } } ``` ## Pipeline Reference Ran the `kv-secrets` E2E test locally and passed:  | Pipeline | | -------- | | | ## 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`: - [x] 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. - [x] 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. - [ ] 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: hundredacres <[email protected]>
- Loading branch information
1 parent
9e9b912
commit 9a0b5af
Showing
8 changed files
with
608 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.