brain246 / azure-firewall-rule

PS module for auto-creation of firewall rules in Synapse/Sql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add-AzFirewallRule

Description

This Powershell module adds-or-updates firewall rules for your current client ip-address to all Azure Synapse Workspaces & SQL Servers located in the provided Resourcegroup.

Installation

Dependencies

  • Az.Accounts
  • Az.Synapse
  • Az.Sql

Elevated1 installation for all users

Install-Module -Name Add-AzFirewallRule

Installation for the current user only (no admin rights)

Install-Module -Name Add-AzFirewallRule -Scope CurrentUser

Usage

# Provide specific tenant/subscription
Add-AzFirewallRule -tenantId "myAzureTenantId" -SubscriptionId "myAzureSubscriptionId" -resourceGroupName "myResourceGroup"
# Or use tenant and subscription of your current context
Add-AzFirewallRule -tenantId $((Get-AzContext).Tenant.Id) -SubscriptionId $((Get-AzContext).Subscription.Id) -resourceGroupName "myResourceGroup" 

Pipeline Status

.github/workflows/main.yml

Resources

Powershell Gallery

Footnotes

  1. Needs the Powershell console to be executed als local administrator.

About

PS module for auto-creation of firewall rules in Synapse/Sql

License:GNU General Public License v2.0


Languages

Language:PowerShell 100.0%