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
json_file="workspace-ip-access-lists/${{ parameters.BUNDLE_TARGET }}.json" | |
jq -c '.[]' "$json_file" | while IFS= read -r json_object_delete; do | |
operation=$(echo $json_object_delete | jq -r '.operation') | |
ip_access_list_id=$(echo $json_object_delete | jq -r '.ip_access_list_id') | |
if [[ ${operation,,} == "delete"* ]]; then | |
echo "Deleting specified Databricks IP Access List: $json_object_delete" | |
databricks ip-access-lists delete "$ip_access_list_id" -t "${{ parameters.BUNDLE_TARGET }}" --log-level "${{ parameters.DATABRICKS_LOG_LEVEL }}" || true | |
fi | |
done |
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
json_file="workspace-ip-access-lists/${{ parameters.BUNDLE_TARGET }}.json" | |
jq -c '.[]' "$json_file" | while IFS= read -r json_object_update; do | |
operation=$(echo $json_object_update | jq -r '.operation') | |
ip_access_list_id=$(echo $json_object_update | jq -r '.ip_access_list_id') | |
if [[ ${operation,,} == "update"* ]]; then | |
echo "Updating existing specified Databricks IP Access List: $json_object_update" | |
databricks ip-access-lists update "$ip_access_list_id" --json "$json_object_update" -t "${{ parameters.BUNDLE_TARGET }}" --log-level "${{ parameters.DATABRICKS_LOG_LEVEL }}" || true | |
fi | |
done |
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
json_file="workspace-ip-access-lists/${{ parameters.BUNDLE_TARGET }}.json" | |
jq -c '.[]' "$json_file" | while IFS= read -r json_object_creation; do | |
operation=$(echo $json_object_creation | jq -r '.operation') | |
if [[ ${operation,,} == "create"* ]]; then | |
echo "Creating new specified Databricks IP Access List: $json_object_creation" | |
databricks ip-access-lists create --json "$json_object_creation" -t "${{ parameters.BUNDLE_TARGET }}" --log-level "${{ parameters.DATABRICKS_LOG_LEVEL }}" || true | |
fi | |
done |
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
echo "Listing existing Databricks Workspace IP Access Lists" | |
databricks ip-access-lists list -o json -t ${{ parameters.BUNDLE_TARGET }} --log-level ${{ parameters.DATABRICKS_LOG_LEVEL }} | |
echo "Enabling Databricks Workspace IP Access Lists if pipeline parameter is true" | |
databricks workspace-conf set-status enableIpAccessLists --json '{"enableIpAccessLists": "${{ parameters.ADB_ENABLE_IP_ACCESS_LISTS }}"}' -t ${{ parameters.BUNDLE_TARGET }} --log-level ${{ parameters.DATABRICKS_LOG_LEVEL }} | |
echo "Checking Databricks Workspace IP Access Lists enablement status" | |
databricks workspace-conf get-status enableIpAccessLists -t ${{ parameters.BUNDLE_TARGET }} --log-level ${{ parameters.DATABRICKS_LOG_LEVEL }} |
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
param( | |
[string]$workspaceId, | |
[string]$workspaceKey | |
) | |
$mma = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg' | |
if ($mma.GetCloudWorkspace($workspaceId).workspaceid -ne $workspaceId) | |
{ | |
$mma.AddCloudWorkspace($workspaceId, $workspaceKey) |
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
targetScope = 'resourceGroup' | |
// PARAMETERS | |
param actionGroupName string | |
param actionGroupEnabled bool | |
param actionGroupShortName string | |
param actionGroupEmailName string | |
param actionGroupEmail string | |
param actionGroupAlertSchema bool |
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
targetScope = 'subscription' | |
// PARAMETERS | |
param bicepExampleInitiativeId string | |
param assignmentIdentityLocation string | |
param assignmentEnforcementMode string | |
// RESOURCES | |
resource bicepExampleAssignment 'Microsoft.Authorization/policyAssignments@2020-09-01' = { | |
name: 'bicepExampleAssignment' |
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
targetScope = 'subscription' | |
// PARAMETERS | |
param actionGroupName string | |
param actionGroupRG string | |
param actionGroupId string | |
param metricAlertResourceNamespace string | |
param metricAlertName string | |
param metricAlertDimension1 string | |
param metricAlertDimension2 string |
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
targetScope = 'subscription' | |
// PARAMETERS | |
param resourceGroupName string = 'BicepExampleRG' | |
param resourceGrouplocation string = 'australiaeast' | |
param actionGroupName string = 'BicepExampleAG' | |
param actionGroupEnabled bool = true | |
param actionGroupShortName string = 'bicepag' | |
param actionGroupEmailName string = 'jloudon' | |
param actionGroupEmail string = '[email protected]' |
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
resource "azurerm_policy_set_definition" "example" { | |
name = "foundations" | |
policy_type = "Custom" | |
display_name = "Foundations" | |
description = "Contains built-in policies for Foundations" | |
metadata = jsonencode({ category = "Custom", version = "1.0.0", source = "Terraform" }) | |
dynamic "policy_definition_reference" { #built-in policies without parameter_values | |
for_each = data.azurerm_policy_definition.builtin_policies_foundations |
NewerOlder