Repository navigation
chore: update Terraform reference for provider v0.10.1 and v0.10.2 #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,18 +60,38 @@ To create an API token: | |
| API tokens grant full access to your Kosli organization. Store them securely and never commit them to version control. | ||
| </Warning> | ||
|
|
||
| ### Required permissions | ||
|
|
||
| Use a token that belongs to a user or service account with the **Admin** role. | ||
|
|
||
| Some provider operations are restricted to admins. Destroying a `kosli_environment` or `kosli_logical_environment` archives the environment in Kosli, and archiving requires the Admin role. With a Member token, `terraform apply` can create and update environments. However, `terraform destroy` (or removing the resource from your configuration) fails with `403 Forbidden` and the resource stays in state. | ||
|
|
||
| The recommended setup is a dedicated service account with the `admin` privilege and an API key minted for it. You can create both in the Kosli UI under **Settings** → **Service Accounts**, or with the [`kosli_service_account`](/terraform-reference/resources/service_account) and [`kosli_service_account_api_key`](/terraform-reference/resources/service_account_api_key) resources. The initial bootstrap with these resources must itself run with an Admin token, because a service account cannot be granted a higher privilege than the caller's. | ||
|
|
||
| ## Regional endpoints | ||
|
|
||
| Kosli operates in multiple regions. Configure the `api_url` to match your organization's region: | ||
|
|
||
| - **EU (Default)**: `https://app.kosli.com` | ||
| - **US**: `https://app.us.kosli.com` | ||
|
|
||
| The `api_url` must use `https`. Plain `http` is only accepted for localhost. | ||
|
|
||
| ## Telemetry | ||
|
|
||
| Alongside the `User-Agent`, every request the provider sends to Kosli carries these headers, which Kosli uses to understand how the provider is used: | ||
|
|
||
| - `X-Kosli-Client`: the provider name and version, for example `terraform/v0.11.0` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: This example uses |
||
| - `X-Kosli-Operation`: the resource, data source, or list resource type and the operation, for example `kosli_environment create` or `data.kosli_flow read` | ||
| - `X-Kosli-Invocation-Id`: a random ID generated each time Terraform starts the provider, which groups the requests from that run | ||
|
|
||
| These headers contain only type names and operation names. The provider never sends configuration values, such as resource names, URLs, or IDs, in these headers. | ||
|
|
||
| ## Schema | ||
|
|
||
| ### Optional | ||
|
|
||
| - `api_token` (String, Sensitive) Kosli API token for authentication. Can also be set via KOSLI_API_TOKEN environment variable. | ||
| - `api_url` (String) Kosli API endpoint URL. Defaults to https://app.kosli.com (EU region). Use https://app.us.kosli.com for US region. Can also be set via KOSLI_API_URL environment variable. | ||
| - `api_url` (String) Kosli API endpoint URL. Defaults to https://app.kosli.com (EU region). Use https://app.us.kosli.com for US region. Must use https; plain http is only accepted for localhost. Can also be set via KOSLI_API_URL environment variable. | ||
| - `org` (String) Kosli organization name. Can also be set via KOSLI_ORG environment variable. | ||
| - `timeout` (Number) HTTP client timeout in seconds. Defaults to 30 seconds. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improvement: The new Required permissions section says a Member token can't archive environments. This warning still says every API token grants "full access to your Kosli organization", so the page now contradicts itself, and a reader may skip the role check. Reword it to describe the token's access in terms of its owner's role, and make the same change in the upstream
terraform-provider-koslidocs so the next sync doesn't bring the old wording back.