Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Azure bicep store App Ip in string parameter

I would like to store the outbound ip of an App site in a string parameter, so I could use it later to split the ips into an array, but I get the "this symbol cannot be referenced here. only other parameters can be referenced in parameter default values" message and I do not how to proceed

Can anyone help me? Here is my code:

resource sitewww 'Microsoft.Web/sites@2022-03-01' = {

name: 'sitewwwname'
location: 'westeurope'

}

param variable string = sitewww.properties.outboundIpAddresses
param allowedIpAddresses array = split(variable,',')

Thank you very much!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You want to be using a variables here not a parameters.

So the param declarations below your resource would change to var

So your bicep above would be

resource sitewww 'Microsoft.Web/sites@2022-03-01' = {

name: 'sitewwwname'
location: 'westeurope'

}

var variable = sitewww.properties.outboundIpAddresses
var allowedIpAddresses = split(variable,',')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading