You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/python/README.md
+102Lines changed: 102 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,108 @@ To use from .NET, install using `dotnet add package`:
65
65
dotnet add package Pulumi.stackit
66
66
```
67
67
68
+
## Authentication
69
+
70
+
To authenticate, you will need a [service account](https://docs.stackit.cloud/stackit/en/service-accounts-134415819.html). Create it in the [STACKIT Portal](https://portal.stackit.cloud/) and assign the necessary permissions to it, e.g. `project.owner`.
71
+
72
+
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:
73
+
74
+
1. Explicit configuration, e.g. by setting the field `serviceAccountKeyPath` in the provider block
75
+
2. Environment variable, e.g. by setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH` or `STACKIT_SERVICE_ACCOUNT_KEY`
76
+
3. Credentials file
77
+
78
+
The provider will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified,
79
+
or in `$HOME/.stackit/credentials.json` as a fallback.
80
+
The credentials file should be a JSON and each credential should be set using the name of the respective environment variable, as stated below in each flow. Example:
The following instructions assume that you have created a service account and assigned the necessary permissions to it, e.g. `project.owner`.
91
+
92
+
To use the key flow, you need to have a service account key, which must have an RSA key-pair attached to it.
93
+
94
+
When creating the service account key, a new pair can be created automatically, which will be included in the service account key.
95
+
96
+
**Optionally**, you can provide your own private key when creating the service account key, which will then require you to also provide it explicitly to the [STACKIT Pulumi Provider](https://github.com/stackitcloud/pulumi-stackit), additionally to the service account key. Check the STACKIT Knowledge Base for an [example of how to create your own key-pair](https://docs.stackit.cloud/stackit/en/usage-of-the-service-account-keys-in-stackit-175112464.html#UsageoftheserviceaccountkeysinSTACKIT-CreatinganRSAkey-pair).
97
+
98
+
To configure the key flow, follow this steps:
99
+
100
+
1. Create a service account key:
101
+
102
+
- Use the [STACKIT Portal](https://portal.stackit.cloud/): go to the `Service Accounts` tab, choose a `Service Account` and go to `Service Account Keys` to create a key. For more details, see [Create a service account key](https://docs.stackit.cloud/stackit/en/create-a-service-account-key-175112456.html)
103
+
104
+
2. Save the content of the service account key by copying it and saving it in a JSON file.
105
+
106
+
The expected format of the service account key is a **JSON** with the following structure:
- setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH` in the credentials file (see above)
135
+
136
+
> **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:
137
+
>
138
+
> - setting the field in the provider block: `privateKey` or `privateKeyPath`
139
+
> - setting the environment variable: `STACKIT_PRIVATE_KEY_PATH` or `STACKIT_PRIVATE_KEY`
140
+
> - setting `STACKIT_PRIVATE_KEY_PATH` in the credentials file (see above)
141
+
142
+
143
+
## Opting into Beta Resources
144
+
145
+
To use beta resources in the STACKIT Pulumi provider, follow these steps:
146
+
147
+
1.**Provider Configuration Option**
148
+
149
+
Set the `enableBetaResources` option in the provider configuration. This is a boolean attribute that can be either `true` or `false`. This can be done either in code directly or via the `pulumi config` command which writes this to a Pulumi.yaml file (e.g. `pulumi config set stackit:experiments [\"routing-tables\"]`).
150
+
151
+
The examples folder provides the information how this can be done in code.
152
+
153
+
2.**Environment Variable**
154
+
155
+
Set the `STACKIT_TF_ENABLE_BETA_RESOURCES` environment variable to `"true"` or `"false"`. Other values will be ignored and will produce a warning.
156
+
157
+
```sh
158
+
export STACKIT_TF_ENABLE_BETA_RESOURCES=true
159
+
```
160
+
161
+
> **Note**: The environment variable takes precedence over the provider configuration option. This means that if the `STACKIT_TF_ENABLE_BETA_RESOURCES` environment variable is set to a valid value (`"true"` or `"false"`), it will override the `enableBetaResources` option specified in the provider configuration.
162
+
163
+
164
+
## Opting into Experiments
165
+
166
+
Experiments are features that are even less mature and stable than Beta Resources. While there is some assumed stability in beta resources, will have to expect breaking changes while using experimental resources. Experimental Resources do not come with any support or warranty.
167
+
168
+
To enable experiments set the experiments field in the provider definition via the same way as seen for beta resources.
169
+
68
170
## Configuration
69
171
70
172
The following configuration points are available for the `stackit` provider:
0 commit comments