Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure/templates/vwan-managed-app/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"dependsOn": [
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('managed_identity_name'))]"
],
"name": "reader_role_assignment",
"name": "[concat('reader_role_assignment_', uniqueString(parameters('deploymentTime'), resourceGroup().name))]",
"apiVersion": "2021-04-01",
"resourceGroup": "[split(parameters('hubId'), '/')[4]]",
"subscriptionId": "[subscription().subscriptionId]",
Expand Down
12 changes: 4 additions & 8 deletions cloudguard-network-application/cgns_onboarding_azure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ usage() {
echo " --help Show this help message and exit"
}


# -----------------------------------------------------------------------------
# Color Output Functions
#
Expand All @@ -59,7 +60,6 @@ usage() {
# Call the desired function with the text to print in color, e.g.:
# red "This is an error message"
# -----------------------------------------------------------------------------

end="\033[0m"
red="\033[0;31m"
function red {
Expand Down Expand Up @@ -203,7 +203,6 @@ parse_input() {
# The command's output is stored in the variable 'AzOutput', and the exit code in 'AzRetVal'.
# Errors from the az command do not cause the script to exit; they are handled by the caller.
# ---------------------------------------------------------------------------

az_wrapper() {
if [ "$dry_run" = "true" ]; then
echo "az $*"
Expand Down Expand Up @@ -293,6 +292,7 @@ rollback() {
}



# rollback_delete_customer_app
# ----------------------------
# Deletes an Azure AD application with the specified name, including its role assignments.
Expand All @@ -316,8 +316,6 @@ rollback() {
# 0 if the application is not found or deleted successfully.
# Exits with error if multiple applications are found or if any operation fails.
# -------------------------------------------------------------------------------


rollback_delete_customer_app() {
az_wrapper ad app list --filter "displayName eq '$app_name'" --query "[].appId" -o tsv

Expand Down Expand Up @@ -351,6 +349,7 @@ rollback_delete_customer_app() {
}



# Function to prompt user for confirmation
check_if_user_would_like_to_proceed() {
local message="$1"
Expand Down Expand Up @@ -380,6 +379,7 @@ check_if_user_would_like_to_proceed() {
}



# Function to delete multi-tenant service principal role assignments
rollback_delete_multi_tenant_sp_role_assignments(){
if service_principal_doesnt_exists "$multi_tenant_app_id"; then
Expand All @@ -403,7 +403,6 @@ rollback_delete_multi_tenant_sp_role_assignments(){
# - Deletes all role assignments by their IDs.
# - If deletion fails, prints a warning message with the error details.
# --------------------------------------------------------------------------

rollback_delete_role_assignments(){
local app_to_delete=$1
local role_assignments
Expand Down Expand Up @@ -486,7 +485,6 @@ set_scope() {
# Returns:
# 0 if the user has sufficient permissions, otherwise exits with an error.
#------------------------------------------------------------------------------

validate_user_permissions() {
local scope_type="$1"

Expand Down Expand Up @@ -748,7 +746,6 @@ service_principal_doesnt_exists() {
# - Creates role assignments in Azure for the specified application and scope.
# - May create multiple role assignments depending on the onboarding mode.
# ------------------------------------------------------------------------------------

create_role_assignments_for_cloudguard_app() {
local app_id=$1
if [ -z "$sp_id" ]; then
Expand Down Expand Up @@ -785,7 +782,6 @@ create_role_assignments_for_cloudguard_app() {
# - If the assignment does not exist, attempts to create it.
# - Exits with an error message if listing or creating the role assignment fails.
# ------------------------------------------------------------------------------------

app_add_role_assignment_if_needed() {
local app_id=$1
local scope=$2
Expand Down
1 change: 0 additions & 1 deletion terraform/aws/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ⚠️ Directory Deprecated
This directory is now officially deprecated. All future development and maintenance will take place in a new [repository](https://registry.terraform.io/modules/CheckPointSW/cloudguard-network-security/aws/latest)

.

### 📌 New Repository and Modules
Expand Down