From 135f86d645b2ff0b93445a14d028212a045bce5f Mon Sep 17 00:00:00 2001 From: Vicente Pinto Date: Fri, 8 Sep 2023 17:37:07 +0100 Subject: [PATCH] Update provider doc (#11) --- docs/index.md | 5 +++++ website/docs/index.html.markdown | 29 ----------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 website/docs/index.html.markdown diff --git a/docs/index.md b/docs/index.md index 95d031ae..064d82da 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,6 +8,11 @@ description: |- # stackit Provider +The STACKIT provider is the official Terraform provider to integrate all the resources developed by STACKIT. + +# Authentication + +Currently, only the *token flow* is supported. The Terraform provider will first try to find a token in the `STACKIT_SERVICE_ACCOUNT_TOKEN` env var. If not present, it will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified, or in `$HOME/.stackit/credentials.json` as a fallback. If the token is found, all the requests are authenticated using that token. ## Example Usage diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown deleted file mode 100644 index f42b57b2..00000000 --- a/website/docs/index.html.markdown +++ /dev/null @@ -1,29 +0,0 @@ -The STACKIT provider is the official Terraform provider to integrate all the resources developed by STACKIT. - -## Authentication - -Before you can start using the client, you will need to create a STACKIT Service Account in your project and assign it the appropriate permissions (i.e. `project.owner`). - -After the service account has been created, you can authenticate to the client using the Token flow. - -### Token flow -There are multiple ways to provide the token to the Terraform provider: -- Pass it to the provider directly: -``` -provider "stackit" { - service_account_token = "[TOKEN]" -} -``` - -- Set it in an environment variable: -```bash -export STACKIT_SERVICE_ACCOUNT_TOKEN="[TOKEN]" -``` - -- Create a file `~/.stackit/credentials.json` with the content: -```json -{ - "STACKIT_SERVICE_ACCOUNT_TOKEN": "[TOKEN]" -} -``` -> To read from another location, either pass the file path to the provider using the variable `credentials_path`, or set the environment variable `STACKIT_CREDENTIALS_PATH` as the file path. \ No newline at end of file