Skip to content

How to make an HTTP call from Bicep? #7857

Answered by brwilkinson
glzbcrt asked this question in Q&A
Discussion options

You must be logged in to vote

Generally you should check if there is a list* function available on the provider.

https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-resource#implementations

That will allow for a POST call, which often works for some API calls.

In this case that doesn't exist, so the next best option will be to use a DeploymentScript. which is calling az cli or powershell from Bicep.

It's quite easy...

here are a few examples...

https://github.com/brwilkinson/AzureDeploymentFramework/blob/main/ADF/bicep/x.setCDNServicesCertificates.ps1.bicep
https://github.com/brwilkinson/AzureDeploymentFramework/blob/main/ADF/bicep/x.setStorageKeyRotation.bicep

resource deploymentUser '…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@glzbcrt
Comment options

Answer selected by glzbcrt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants