Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
89 stars 7 forks source link

Deployment Stack Parameters does not support .bicepparm files #121

Closed JFolberth closed 1 year ago

JFolberth commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like Be able to pass in a .bicepparam file to the stack

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

dantedallag commented 1 year ago

Hi @JFolberth, our New/Set cmdlets should be supporting .bicepparam files by passing it in the TemplatesParameterFile parameter as you would do a json parameter file. Could you share the exact command you are using that is running into this issue? Also, could you share the version of stacks you are using by outputting the Az.Resources version with 'Get-InstalledModule -Name Az.Resources'?

JFolberth commented 1 year ago

@dantedallag

Sure,

The command: az stack sub create --name 'storageAccounts' --location 'eastus' --template-file 'main.bicep' --parameters parameters/dev.eus.parameters.bicep --deny-settings-mode 'none'

and the Az.Resources version is 6.9.1

harshpatel17 commented 1 year ago

Hi @JFolberth would you be able to share your bicep parameter file?

I believe we only support bicep parameter files that have the extension type .bicepparam not .parameters.bicep.

JFolberth commented 1 year ago

@harshpatel17 sure.

This is all the content is:

param location = 'eastus'
param environmentName= 'dev'
param storageAccountType = 'Standard_LRS'
param numberOfStorageAccounts = 2

I would think this might be a bug then vs new feature since ARM did support this. The use case is leveraging a "." vs an "" file naming convention since the "" lacks in support when recognizing file names. There are multiple customers i have worked with who label ARM files like dev.parameters.json and one would imagine the equivalent would be dev.parameters.bicepparam

JFolberth commented 1 year ago

Can ignore this. I had typed the file name wrong :(