Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
3 changes: 2 additions & 1 deletion .github/workflows/sdk-refresh-oci-regions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ jobs:
This PR updates the `OCI_COMMERCIAL_REGIONS` dictionary in `prowler/providers/oraclecloud/config.py` with the latest regions fetched from the OCI Identity API (`list_regions()`).

- Government regions (`OCI_GOVERNMENT_REGIONS`) are preserved unchanged
- DOD regions (`OCI_DOD_REGIONS`) are preserved unchanged
- Region display names are mapped from Oracle's official documentation

### Checklist

- [x] This is an automated update from OCI official sources
- [x] Government regions (us-langley-1, us-luke-1) preserved
- [x] Government regions (us-langley-1, us-luke-1) and DOD regions (us-gov-ashburn-1, us-gov-phoenix-1, us-gov-chicago-1) arepreserved
- [x] No manual review of region data required

### License
Expand Down
11 changes: 9 additions & 2 deletions prowler/providers/oraclecloud/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,15 @@
# OCI Government Regions
OCI_GOVERNMENT_REGIONS = {
"us-langley-1": "US Gov West",
"us-luke-1": "US Gov East",
"us-luke-1": "US Gov East"
}

# OCI Defense Regions
OCI_DOD_REGIONS = {
    "us-gov-ashburn-1": "US DoD East (Ashburn)",
    "us-gov-chicago-1": "US DoD North (Chicago)",
    "us-gov-phoenix-1": "US DoD West (Phoenix)",
}

# All OCI Regions
OCI_REGIONS = {**OCI_COMMERCIAL_REGIONS, **OCI_GOVERNMENT_REGIONS}
OCI_REGIONS = {**OCI_COMMERCIAL_REGIONS, **OCI_GOVERNMENT_REGIONS, **OCI_DOD_REGIONS}
4 changes: 4 additions & 0 deletions util/update_oci_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ def update_config_file(regions, config_file_path):
raise Exception(
"Validation failed: OCI_GOVERNMENT_REGIONS section missing after update. Aborting to prevent data loss."
)
if "OCI_DOD_REGIONS" not in updated_content:
raise Exception(
"Validation failed: OCI_DOD_REGIONS section missing after update. Aborting to prevent data loss."
)

# Verify the replacement was successful
if updated_content == config_content:
Expand Down
Loading