Skip to content

Commit ecf5fa8

Browse files
Merge pull request #34 from AikidoSec/fix/exclude-me-regions
fix: Exclude ME regions
2 parents 8ead65f + ce939ce commit ecf5fa8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

aws/multi_region.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ package aws
6363
import (
6464
"context"
6565
"fmt"
66+
"os"
6667
"path"
6768
"regexp"
6869
"slices"
@@ -146,6 +147,11 @@ func SupportedRegionMatrix(serviceID string) func(ctx context.Context, d *plugin
146147
// for manual overrides if the service definition is incorrect.
147148
func SupportedRegionMatrixWithExclusions(serviceID string, excludeRegions []string) func(ctx context.Context, d *plugin.QueryData) []map[string]interface{} {
148149
return func(ctx context.Context, d *plugin.QueryData) []map[string]interface{} {
150+
excludedRegionsEnv := os.Getenv("STEAMPIPE_EXCLUDED_REGIONS")
151+
if excludedRegionsEnv != "" {
152+
regions := strings.Split(excludedRegionsEnv, ",")
153+
excludeRegions = append(excludeRegions, regions...)
154+
}
149155
logging.LogTime("SupportedRegionMatrixWithExlusions start")
150156
defer logging.LogTime("SupportedRegionMatrixWithExlusions end")
151157
// Default to an empty list of regions

0 commit comments

Comments
 (0)