Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(azure): deprecate AzureGermanCloud #5561

Merged
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
22 changes: 10 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 @@ -60,7 +60,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]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ version = "4.5.0"
[tool.poetry.dependencies]
alive-progress = "3.1.5"
awsipranges = "0.3.3"
azure-identity = "1.18.0"
azure-identity = "1.19.0"
azure-keyvault-keys = "4.9.0"
azure-mgmt-applicationinsights = "4.0.0"
azure-mgmt-authorization = "4.0.0"
Expand Down
3 changes: 0 additions & 3 deletions tests/lib/cli/parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1288,13 +1288,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 @@ -1304,7 +1302,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
Loading