2

Azure CLI: Add/Remove IP Addresses On Azure Synapse Firewall | Build5Nines

 2 years ago
source link: https://build5nines.com/azure-cli-add-remove-ip-addresses-on-azure-synapse-firewall/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Azure CLI: Add/Remove IP Addresses on Azure Synapse Firewall

By Chris Pietschmann | July 20, 2022 - 12:36 PM CDT (17:36 UTC)Categories: Azure CLI, Big Data, Security


Azure CLI: Add/Remove IP Addresses on Azure Synapse Firewall

Recently, I performed a lot of work as a Site Reliability Engineer (SRE) / DevOps Engineer on a project that utilizes Azure Synapse for a large data lake and data processing implementation. Through my duties as SRE, I needed to configure the security of Azure Synapse by adding an allow list for IP Addresses that were allowed to connect to the Azure Synapse Workspace.

The Azure CLI provides the az synapse workspace firewall-rule commands for managing the firewall configuration for Azure Synapse Workspaces. The create and delete commands within it can be used to create and delete IP Addresses from the Azure Synapse Firewall allow list respectively.

Below is a sample command for adding an IP Address range to the allow list of the Azure Synapse Workspace firewall. When adding a single IP Address, the start IP Address (aka --start-ip-address) and end IP Address (--end-ip-address) for the range will need to be set to the single IP Address being added. Otherwise, you can specify the starting and ending IP Addresses in the range.

az synapse workspace firewall-rule create \
  --name <ip-address-name> \
  --start-ip-address <start-ip-address-range> \
  --end-ip-address <end-ip-address-range> \
  --resource-group <resource-group-name> \
  --workspace-name <azure-synapse-workspace-name>

Also, below is a sample command for deleting (or removing) an IP Address from the Azure Synapse Workspace firewall allow list.

az synapse workspace firewall-rule delete \
  --name <ip-address-name> \
  --resource-group <resource-group-name> \
  --workspace-name <azure-synapse-workspace-name> \
  --yes

In the above Azure CLI az synapse workspace firewall-rule commands, you’ll want to set the following parameters to the appropriate values for your Azure Synapse Workspace:

  • --name is the name given to the IP Address range once it’s added to the Azure Synapse Workspace firewall allow list.
  • --resource-group is the Azure Resource Group name where the Azure Synapse Workspace resides within Azure.
  • --workspace-name is the name of the Azure Synapse Workspace resource of which the firewall allow list will be managed.

Here’s an example usage of the above command to add a specific IP Address to the firewall allow list of an Azure Synapse Workspace instance:

az synapse workspace firewall-rule create \
  --name "SomeMachineThatNeedsAccess" \
  --start-ip-address 8.8.8.8 \
  --end-ip-address 8.8.8.8 \
  --resource-group "MyResourceGroup" \
  --workspace-name "MySynapseWorkspace"

Happing scripting!

About the Author

d565ce4d3fdf8007e1d707362cca9465?s=128&d=identicon&r=gMicrosoft MVP

Chris Pietschmann

Chris Pietschmann is a Microsoft MVP (Azure & IoT) and HashiCorp Ambassador (2021) with 20+ years of experience designing and building Cloud & Enterprise systems. He has worked with companies of all sizes from startups to Fortune 100. He is also a Microsoft Certified Azure Solutions Architect and developer, a Microsoft Certified Trainer (MCT), and Cloud Advocate. He has a passion for technology and sharing what he learns with others to help enable them to learn faster and be more productive.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK