Skip to content

Commit

Permalink
Revert "ref: update provider docs on changing data storage location (#…
Browse files Browse the repository at this point in the history
…432)"

This reverts commit 8a4f166.
  • Loading branch information
jianyuan committed May 22, 2024
1 parent 3efa8a7 commit a5ab384
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 42 deletions.
24 changes: 4 additions & 20 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,13 @@ provider "sentry" {
## Example Usage

```terraform
# Configure the Sentry Provider for US data storage location (default)
provider "sentry" {
token = var.sentry_auth_token
# If you want to be explicit, you can specify the base URL for the US region.
# base_url = "https://us.sentry.io/api/"
# or
# base_url = "https://sentry.io/api/"
}
# Configure the Sentry Provider for EU data storage location
provider "sentry" {
token = var.sentry_auth_token
base_url = "https://de.sentry.io/api/"
}
# Configure the Sentry Provider for self-hosted Sentry
# Configure the Sentry Provider
provider "sentry" {
token = var.sentry_auth_token
# If you are self-hosting Sentry, set the base URL here.
# The URL format must be "https://[hostname]/api/".
base_url = "https://example.com/api/"
# base_url = "https://example.com/api/"
}
```

Expand All @@ -73,7 +57,7 @@ provider "sentry" {

### Optional

- `base_url` (String) The target Sentry Base API URL follows the format `https://[hostname]/api/`. The default value is `https://sentry.io/api/`, which is an alias for `https://us.sentry.io/api/` (US data storage location). To change the data storage location to the EU, set the value to `https://de.sentry.io/api/`. This value is required for non-US storage locations or Sentry On-Premise deployments. The value can be sourced from the `SENTRY_BASE_URL` environment variable.
- `base_url` (String) The target Sentry Base API URL in the format `https://[hostname]/api/`. The default value is `https://sentry.io/api/`. The value must be provided when working with Sentry On-Premise. The value can be sourced from the `SENTRY_BASE_URL` environment variable.
- `token` (String, Sensitive) The authentication token used to connect to Sentry. The value can be sourced from the `SENTRY_AUTH_TOKEN` environment variable.


Expand Down
22 changes: 3 additions & 19 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
# Configure the Sentry Provider for US data storage location (default)
provider "sentry" {
token = var.sentry_auth_token

# If you want to be explicit, you can specify the base URL for the US region.
# base_url = "https://us.sentry.io/api/"
# or
# base_url = "https://sentry.io/api/"
}

# Configure the Sentry Provider for EU data storage location
provider "sentry" {
token = var.sentry_auth_token

base_url = "https://de.sentry.io/api/"
}

# Configure the Sentry Provider for self-hosted Sentry
# Configure the Sentry Provider
provider "sentry" {
token = var.sentry_auth_token

# If you are self-hosting Sentry, set the base URL here.
# The URL format must be "https://[hostname]/api/".
base_url = "https://example.com/api/"
# base_url = "https://example.com/api/"
}
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (p *SentryProvider) Schema(ctx context.Context, req provider.SchemaRequest,
Sensitive: true,
},
"base_url": schema.StringAttribute{
MarkdownDescription: "The target Sentry Base API URL follows the format `https://[hostname]/api/`. The default value is `https://sentry.io/api/`, which is an alias for `https://us.sentry.io/api/` (US data storage location). To change the data storage location to the EU, set the value to `https://de.sentry.io/api/`. This value is required for non-US storage locations or Sentry On-Premise deployments. The value can be sourced from the `SENTRY_BASE_URL` environment variable.",
MarkdownDescription: "The target Sentry Base API URL in the format `https://[hostname]/api/`. The default value is `https://sentry.io/api/`. The value must be provided when working with Sentry On-Premise. The value can be sourced from the `SENTRY_BASE_URL` environment variable.",
Optional: true,
},
},
Expand Down
7 changes: 5 additions & 2 deletions sentry/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ func NewProvider(version string) func() *schema.Provider {
p := &schema.Provider{
Schema: map[string]*schema.Schema{
"token": {
Description: "The authentication token used to connect to Sentry. The value can be sourced from the `SENTRY_AUTH_TOKEN` environment variable.",
Description: "The authentication token used to connect to Sentry. The value can be sourced from " +
"the `SENTRY_AUTH_TOKEN` environment variable.",
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"SENTRY_AUTH_TOKEN", "SENTRY_TOKEN"}, nil),
Sensitive: true,
},
"base_url": {
Description: "The target Sentry Base API URL follows the format `https://[hostname]/api/`. The default value is `https://sentry.io/api/`, which is an alias for `https://us.sentry.io/api/` (US data storage location). To change the data storage location to the EU, set the value to `https://de.sentry.io/api/`. This value is required for non-US storage locations or Sentry On-Premise deployments. The value can be sourced from the `SENTRY_BASE_URL` environment variable.",
Description: "The target Sentry Base API URL in the format `https://[hostname]/api/`. " +
"The default value is `https://sentry.io/api/`. The value must be provided when working with " +
"Sentry On-Premise. The value can be sourced from the `SENTRY_BASE_URL` environment variable.",
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("SENTRY_BASE_URL", "https://sentry.io/api/"),
Expand Down

0 comments on commit a5ab384

Please sign in to comment.