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
1 change: 0 additions & 1 deletion docs/tutorials/azure/use-non-default-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ At the time of writing this documentation the available Azure Clouds from differ
- AzureCloud
- AzureChinaCloud
- AzureUSGovernment
- AzureGermanCloud

If you want to change the default one you must include the flag `--azure-region`, i.e.:

Expand Down
1 change: 0 additions & 1 deletion prowler/providers/azure/lib/arguments/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def validate_azure_region(region):
regions_allowed = [
"AzureChinaCloud",
"AzureUSGovernment",
"AzureGermanCloud",
"AzureCloud",
]
if region not in regions_allowed:
Expand Down
6 changes: 0 additions & 6 deletions prowler/providers/azure/lib/regions/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

AZURE_CHINA_CLOUD = "https://management.chinacloudapi.cn"
AZURE_US_GOV_CLOUD = "https://management.usgovcloudapi.net"
AZURE_GERMAN_CLOUD = "https://management.microsoftazure.de"
AZURE_GENERIC_CLOUD = "https://management.azure.com"


Expand All @@ -23,10 +22,5 @@ def get_regions_config(region):
"base_url": AZURE_US_GOV_CLOUD,
"credential_scopes": [AZURE_US_GOV_CLOUD + "/.default"],
},
"AzureGermanCloud": {
"authority": AzureAuthorityHosts.AZURE_GERMANY,
"base_url": AZURE_GERMAN_CLOUD,
"credential_scopes": [AZURE_GERMAN_CLOUD + "/.default"],
},
}
return allowed_regions[region]
3 changes: 0 additions & 3 deletions tests/lib/cli/parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,13 +1140,11 @@ def test_validate_azure_region_valid_regions(self):
expected_regions = [
"AzureChinaCloud",
"AzureUSGovernment",
"AzureGermanCloud",
"AzureCloud",
]
input_regions = [
"AzureChinaCloud",
"AzureUSGovernment",
"AzureGermanCloud",
"AzureCloud",
]
for region in input_regions:
Expand All @@ -1156,7 +1154,6 @@ def test_validate_azure_region_invalid_regions(self):
expected_regions = [
"AzureChinaCloud",
"AzureUSGovernment",
"AzureGermanCloud",
"AzureCloud",
]
invalid_region = "non-valid-region"
Expand Down
7 changes: 0 additions & 7 deletions tests/providers/azure/lib/regions/regions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from prowler.providers.azure.lib.regions.regions import (
AZURE_CHINA_CLOUD,
AZURE_GENERIC_CLOUD,
AZURE_GERMAN_CLOUD,
AZURE_US_GOV_CLOUD,
get_regions_config,
)
Expand All @@ -15,7 +14,6 @@ def test_get_regions_config(self):
"AzureCloud",
"AzureChinaCloud",
"AzureUSGovernment",
"AzureGermanCloud",
]
expected_output = {
"AzureCloud": {
Expand All @@ -33,11 +31,6 @@ def test_get_regions_config(self):
"base_url": AZURE_US_GOV_CLOUD,
"credential_scopes": [AZURE_US_GOV_CLOUD + "/.default"],
},
"AzureGermanCloud": {
"authority": AzureAuthorityHosts.AZURE_GERMANY,
"base_url": AZURE_GERMAN_CLOUD,
"credential_scopes": [AZURE_GERMAN_CLOUD + "/.default"],
},
}

for region in allowed_regions:
Expand Down