From 0d049978131a9f916990f3bdd34fc3380d5de1e2 Mon Sep 17 00:00:00 2001 From: Pat Patterson Date: Wed, 28 Aug 2024 12:30:23 -0700 Subject: [PATCH] Explain that users should not need to set the endpoint --- CHANGELOG.md | 1 + README.md | 11 +++++++++++ b2/provider.go | 3 ++- docs/index.md | 6 +++--- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ace087..f54cba7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * Fixed `allowed_operations` stability issue * Use macos-14 for ARM as macos-13-large is Intel +* Clarified the purpose of the `endpoint`/`B2_ENDPOINT` configuration value ## [0.8.12] - 2024-06-20 diff --git a/README.md b/README.md index e7642ff..46e4f3f 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,17 @@ Building make build ``` +Documentation +------------- + +The documentation is generated from the provider source code using +[`tfplugindocs`](https://github.com/hashicorp/terraform-plugin-docs). You will need to regenerate the documentation if +you add or change a data source, resource or argument. + +``` +make docs +``` + Installing ---------- diff --git a/b2/provider.go b/b2/provider.go index 749d8c8..d490d16 100644 --- a/b2/provider.go +++ b/b2/provider.go @@ -50,7 +50,8 @@ func New(version string, exec string) func() *schema.Provider { DefaultFunc: schema.EnvDefaultFunc("B2_APPLICATION_KEY", nil), }, "endpoint": { - Description: "B2 endpoint - production or custom URL (B2_ENDPOINT env)", + Description: "B2 endpoint - the string 'production' or a custom B2 API URL (B2_ENDPOINT env)." + + " Defaults to 'production'. You should not need to set this unless you work at Backblaze.", Type: schema.TypeString, Optional: true, DefaultFunc: schema.EnvDefaultFunc("B2_ENDPOINT", "production"), diff --git a/docs/index.md b/docs/index.md index 35c50e6..167729d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -40,6 +40,6 @@ resource "b2_bucket" "example_bucket" { ### Optional -- **application_key** (String, Sensitive) B2 Application Key (B2_APPLICATION_KEY env) -- **application_key_id** (String, Sensitive) B2 Application Key ID (B2_APPLICATION_KEY_ID env) -- **endpoint** (String) B2 endpoint - production or custom URL (B2_ENDPOINT env) +- `application_key` (String, Sensitive) B2 Application Key (B2_APPLICATION_KEY env) +- `application_key_id` (String, Sensitive) B2 Application Key ID (B2_APPLICATION_KEY_ID env) +- `endpoint` (String) B2 endpoint - the string 'production' or a custom B2 API URL (B2_ENDPOINT env). Defaults to 'production'. You should not need to set this unless you work at Backblaze.