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

possibility to call module from registry with version stored in variable #5913

Open
maxinthecloud opened this issue Feb 8, 2022 · 11 comments
Labels
enhancement New feature or request Needs: Upvote This issue requires more votes to be considered

Comments

@maxinthecloud
Copy link

Is your feature request related to a problem? Please describe.
Now it is not possible to call a module from registry with specified version in a variable

var version = '0.0.1'
module mod_webapp 'br/CoreModules:mod_webapp:${version}' = { 
  name: 'deployment-mod_webapp' 
...
}

Describe the solution you'd like
I would like to store the module version in the variable or param.

@maxinthecloud maxinthecloud added the enhancement New feature or request label Feb 8, 2022
@ghost ghost added the Needs: Triage 🔍 label Feb 8, 2022
@alex-frankel
Copy link
Collaborator

I thought we had another issue about this, but I can't find it. This is feasible with variables, but not with parameters, since parameter values are not known until deployment and that could change the module code that needs to be validated.

@alex-frankel
Copy link
Collaborator

Related: #413

@olorinhill
Copy link

I also have a use case where the path to the ACR and the version of the Bicep module need to be defined as parameters that are leveraged by an Azure DevOps pipeline when deploying/updating infrastructure.

@jhueppauff
Copy link
Contributor

Specifying the name of the ACR as a parameter would be indeed valuable as you wouldn't need to update every template when you migrate to another container registry.

@alex-frankel
Copy link
Collaborator

Specifying the name of the ACR as a parameter would be indeed valuable as you wouldn't need to update every template when you migrate to another container registry.

@jhueppauff - specifically for this case, we would recommend adding an alias to bicepconfig, and if you ever change the ACR URL, you would only need to change the value in bicepconfig:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-config-modules#aliases-for-modules

@SadokLadhari
Copy link

Any news about this feature request plz ? I still have "Error BCP092: String interpolation is not supported in file paths."

@ghost
Copy link

ghost commented May 19, 2023

Hi maxinthecloud, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! 😄 🦾

@ghost ghost closed this as completed May 22, 2023
@joeferreirapremera
Copy link

could this please be reopened? I would really like this enhancement as we can tokenize our paths.

@alex-frankel alex-frankel added Needs: Upvote This issue requires more votes to be considered and removed Needs: Author Feedback Awaiting feedback from the author of the issue labels May 26, 2023
@alex-frankel alex-frankel removed this from the Not as fast as you would like milestone May 26, 2023
@alex-frankel
Copy link
Collaborator

Re-opening and renaming to cover variables specifically, since that's much easier than params.

@alex-frankel alex-frankel reopened this May 26, 2023
@alex-frankel alex-frankel changed the title possibility to call module from registry with version stored in variable or param possibility to call module from registry with version stored in variable ~~or param~~ May 26, 2023
@alex-frankel alex-frankel changed the title possibility to call module from registry with version stored in variable ~~or param~~ possibility to call module from registry with version stored in variable May 26, 2023
@Htorne
Copy link

Htorne commented Aug 17, 2023

We are a large team of developers in my company that would appreciate this feature immensely as we address different versions of bicep modules hosted in an ACR. Pretty please, save us :)

@martinjosephogorman
Copy link

This would be very useful. I have a UAT and a Production container registry for modules, and being able to set the path would be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs: Upvote This issue requires more votes to be considered
Projects
Status: Done
Development

No branches or pull requests

8 participants