arcus-azure/arcus.scripting

Bicep support for InjectFile

Closed this issue · 7 comments

Is your feature request related to a problem? Please describe.
As we are all starting to use bicep, we want to use also inject file in bicep.
Something that is currently unsupported it seems here: https://github.com/arcus-azure/arcus.scripting/blob/master/src/Arcus.Scripting.ARM/Scripts/Inject-ArmContent.ps1

Describe the solution you'd like
So it works identical as with arm templates

Describe alternatives you've considered
Bicep doesn't allow providing a path out of the box, so there are no other options if I'm not mistaken.

Additional context
None

@pim-simons , can we add this to the Arcus.Scripting.ARM PowerShell module? Or is the 'ARM' here not really a good place to store something related to 'Bicep'?

@pim-simons , can we add this to the Arcus.Scripting.ARM PowerShell module? Or is the 'ARM' here not really a good place to store something related to 'Bicep'?

Good point, I would say creating a new Arcus.Scripting.Bicep is cleaner.

I'm still a rookie if it comes to bicep. Is there also something like a place where the FileToInject=... token is placed in a parameter file or something?

I'm still a rookie if it comes to bicep. Is there also something like a place where the FileToInject=... token is placed in a parameter file or something?

Basically Bicep is just a domain-specific language on top of ARM, so it shouldn't be that different.

I'm still a rookie if it comes to bicep. Is there also something like a place where the FileToInject=... token is placed in a parameter file or something?

It was designed in first phase only for the files itself. It might be interesting to have it as a parameter. But in the end, it shouldn't really matter. If you find the pattern, do the magic. No matter if it is a bicep or a json (arm) file.

What kind of file to you want to inject ?
I think it does matter, as ARM is actually plain JSON, but bicep is not compatible with just plain old JSON.

What kind of file to you want to inject ? I think it does matter, as ARM is actually plain JSON, but bicep is not compatible with just plain old JSON.

I think we need the same behavior & features as the current implementation on ARM. and for the posh function I was hoping is was not linked to any file format, but just searching a pattern and replacing there...