π¨βπ»
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Variables | |
# Prompt the user for input | |
read -rp "Enter the resource group name: " resourceGroup | |
read -rp "Enter the location: " location | |
read -rp "Enter the NSG name: " nsgName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Description: | |
# This script creates an Azure Network Security Group (NSG) specifically for Azure API Management | |
# configured with the "internal" VNet injection mode. This mode allows access only from internal | |
# sources. The script includes rules for load balancing, storage access, SQL database access, | |
# Key Vault access, and monitoring services. | |
# | |
# Usage: | |
# The script will prompt for the Azure resource group name, location, and NSG name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Description: | |
# This script creates an Azure Network Security Group (NSG) specifically for Azure API Management | |
# configured with the "external" VNet injection mode. This mode allows access from both external | |
# and internal sources. The script includes rules for API management, load balancing, storage access, | |
# SQL database access, Key Vault access, and monitoring services. | |
# | |
# Usage: | |
# The script will prompt for the Azure resource group name, location, and NSG name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the path to the folder containing tarball files | |
$folderPath = "path/to/folder" | |
# Get the list of tarball files with .tgz extension in the folder | |
$tarballFiles = Get-ChildItem -Path $folderPath -File -Recurse -Filter "*.tgz" | Where-Object { !$_.PSIsContainer } | |
foreach ($tarballFile in $tarballFiles) { | |
# Get the directory and base name of the tarball file | |
$tarballDirectory = Split-Path -Parent $tarballFile.FullName | |
$tarballBaseName = [System.IO.Path]::GetFileNameWithoutExtension($tarballFile.FullName) |