Skip to content

Commit

Permalink
fix: Update the name of the aksAcrPull module from hard-coded to a …
Browse files Browse the repository at this point in the history
…variable. (#3560)

## Description
Updated the name of the aksAcrPull module from hard-coded to a variable.
To ensure that the resource names created for each deployment are
unique.
<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes #123
Fixes #456
Closes #123
Closes #456
-->

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.ptn.azd.acr-container-app](https://github.com/Menghua1/bicep-registry-modules/actions/workflows/avm.ptn.azd.acr-container-app.yml/badge.svg?branch=update-module-name)](https://github.com/Menghua1/bicep-registry-modules/actions/workflows/avm.ptn.azd.acr-container-app.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 -->

@jongio for notification.
  • Loading branch information
Menghua1 authored Oct 25, 2024
1 parent 894b0a9 commit a3355f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions avm/ptn/azd/acr-container-app/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "8683355263365484382"
"version": "0.30.23.60470",
"templateHash": "11200666829036307571"
},
"name": "Azd ACR Linked Container App",
"description": "Creates a container app in an Azure Container App environment.\n\n**Note:** This module is not intended for broad, generic use, as it was designed to cater for the requirements of the AZD CLI product. Feature requests and bug fix requests are welcome if they support the development of the AZD CLI but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case",
Expand Down Expand Up @@ -1428,8 +1428,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "9239508313239206967"
"version": "0.30.23.60470",
"templateHash": "676465844790879977"
},
"name": "ACR Pull permissions",
"description": "Assigns ACR Pull permissions to access an Azure Container Registry.",
Expand Down Expand Up @@ -1463,7 +1463,7 @@
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "acrpullrole-deployment",
"name": "[guid(subscription().id, resourceGroup().id, parameters('principalId'), variables('acrPullRole'))]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var acrPullRole = subscriptionResourceId(
)

module aksAcrPull 'br/public:avm/ptn/authorization/resource-role-assignment:0.1.1' = {
name: 'acrpullrole-deployment'
name: guid(subscription().id, resourceGroup().id, principalId, acrPullRole)
params: {
principalId: principalId
resourceId: containerRegistry.id
Expand Down

0 comments on commit a3355f6

Please sign in to comment.