Skip to content

Commit

Permalink
feat: support for sourcing the provider service region from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ricoli authored and imjaroiswebdev committed Jan 26, 2024
1 parent 1e06eca commit 73ac744
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pagerduty/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func Provider() *schema.Provider {
},

"service_region": {
Type: schema.TypeString,
Optional: true,
Default: "",
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("PAGERDUTY_SERVICE_REGION", ""),
},

"use_app_oauth_scoped_token": {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The following arguments are supported:
* `user_token` - (Optional) The v2 user level authorization token. It can also be sourced from the `PAGERDUTY_USER_TOKEN` environment variable. See [API Documentation](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTUx-authentication) for more information.
* `use_app_oauth_scoped_token` - (Optional) Defines the configuration needed for making use of [App Oauth Scoped API token](https://developer.pagerduty.com/docs/e518101fde5f3-obtaining-an-app-o-auth-token) for authenticating API calls.
* `skip_credentials_validation` - (Optional) Skip validation of the token against the PagerDuty API.
* `service_region` - (Optional) The PagerDuty service region to use. Default to empty (uses US region). Supported value: `eu`. This setting also affects configuration of `use_app_oauth_scoped_token` for setting Region of *App Oauth token credentials*.
* `service_region` - (Optional) The PagerDuty service region to use. Default to empty (uses US region). Supported value: `eu`. This setting also affects configuration of `use_app_oauth_scoped_token` for setting Region of *App Oauth token credentials*. It can also be sourced from the `PAGERDUTY_SERVICE_REGION` environment variable.
* `api_url_override` - (Optional) It can be used to set a custom proxy endpoint as PagerDuty client api url overriding `service_region` setup.

The `use_app_oauth_scoped_token` block contains the following arguments:
Expand Down

0 comments on commit 73ac744

Please sign in to comment.