Skip to content

Commit

Permalink
Read PAGERDUTY_SERVICE_REGION env in provider configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgajard committed Jan 29, 2024
1 parent 31922d5 commit a23818c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pagerdutyplugin/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,

serviceRegion := args.ServiceRegion.ValueString()
if serviceRegion == "" {
serviceRegion = "us"
if v, ok := os.LookupEnv("PAGERDUTY_SERVICE_REGION"); ok && v != "" {
serviceRegion = v
} else {
serviceRegion = "us"
}
}

var regionApiUrl string
Expand Down

0 comments on commit a23818c

Please sign in to comment.