Skip to content

Commit f435d5d

Browse files
authored
chore(docs): add STACKIT_SERVICE_ACCOUNT_KEY and STACKIT_PRIVATE_KEY (#883)
1 parent 8a5de8c commit f435d5d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To authenticate, you will need a [service account](https://docs.stackit.cloud/st
4242
When setting up authentication, the provider will always try to use the key flow first and search for credentials in several locations, following a specific order:
4343

4444
1. Explicit configuration, e.g. by setting the field `service_account_key_path` in the provider block (see example below)
45-
2. Environment variable, e.g. by setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH`
45+
2. Environment variable, e.g. by setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH` or `STACKIT_SERVICE_ACCOUNT_KEY`
4646
3. Credentials file
4747

4848
The provider will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified,
@@ -99,13 +99,15 @@ To configure the key flow, follow this steps:
9999
3. Configure the service account key for authentication in the provider by following one of the alternatives below:
100100

101101
- setting the fields in the provider block: `service_account_key` or `service_account_key_path`
102-
- setting the environment variable: `STACKIT_SERVICE_ACCOUNT_KEY_PATH`
102+
- setting the environment variable: `STACKIT_SERVICE_ACCOUNT_KEY_PATH` or `STACKIT_SERVICE_ACCOUNT_KEY`
103+
- ensure the set the service account key in `STACKIT_SERVICE_ACCOUNT_KEY` is correctly formatted. Use e.g.
104+
`$ export STACKIT_SERVICE_ACCOUNT_KEY=$(cat ./service-account-key.json)`
103105
- setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH` in the credentials file (see above)
104106

105107
> **Optionally, only if you have provided your own RSA key-pair when creating the service account key**, you also need to configure your private key (takes precedence over the one included in the service account key, if present). **The private key must be PEM encoded** and can be provided using one of the options below:
106108
>
107109
> - setting the field in the provider block: `private_key` or `private_key_path`
108-
> - setting the environment variable: `STACKIT_PRIVATE_KEY_PATH`
110+
> - setting the environment variable: `STACKIT_PRIVATE_KEY_PATH` or `STACKIT_PRIVATE_KEY`
109111
> - setting `STACKIT_PRIVATE_KEY_PATH` in the credentials file (see above)
110112
111113
### Token flow

0 commit comments

Comments
 (0)