Skip to content

Instantly share code, notes, and snippets.

@kunalworldwide
Created November 18, 2022 09:37
Show Gist options
  • Save kunalworldwide/639e5f7e59768fc2854df4438267a000 to your computer and use it in GitHub Desktop.
Save kunalworldwide/639e5f7e59768fc2854df4438267a000 to your computer and use it in GitHub Desktop.
steps:
- task: AzureCLI@2
displayName: 'Add Build agent Ip to firewall'
inputs:
azureSubscription: 'sp-dev'
scriptType: ps
scriptLocation: inlineScript
inlineScript: 'az synapse workspace firewall-rule create --name devops-build-agent-ip --workspace-name qa1-ause-asy-01 --resource-group QA1-AUSE-ASY-ARG-01 --start-ip-address (Invoke-RestMethod http://ipinfo.io/json | Select -exp ip) --end-ip-address (Invoke-RestMethod http://ipinfo.io/json | Select -exp ip)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment