Skip to content

Commit a23818c

Browse files
committed
Read PAGERDUTY_SERVICE_REGION env in provider configuration
1 parent 31922d5 commit a23818c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pagerdutyplugin/provider.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
6666

6767
serviceRegion := args.ServiceRegion.ValueString()
6868
if serviceRegion == "" {
69-
serviceRegion = "us"
69+
if v, ok := os.LookupEnv("PAGERDUTY_SERVICE_REGION"); ok && v != "" {
70+
serviceRegion = v
71+
} else {
72+
serviceRegion = "us"
73+
}
7074
}
7175

7276
var regionApiUrl string

0 commit comments

Comments
 (0)