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
Schema for a STACKIT service account access token resource.
7
+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8
+
Example Usage
9
+
Automatically rotate access tokens
10
+
11
+
resource "stackit_service_account" "sa" {
12
+
project_id = var.stackit_project_id
13
+
name = "sa01"
14
+
}
15
+
16
+
resource "time_rotating" "rotate" {
17
+
rotation_days = 80
18
+
}
19
+
20
+
// The access token is valid for 180 days but is configured to rotate every 80 days
// Trigger token rotation based on time_rotating changes.
28
+
rotate_when_changed = {
29
+
rotation = time_rotating.rotate.id
30
+
}
31
+
}
32
+
---
33
+
34
+
# stackit_service_account_access_token (Resource)
35
+
36
+
Schema for a STACKIT service account access token resource.
37
+
38
+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
39
+
## Example Usage
40
+
41
+
42
+
### Automatically rotate access tokens
43
+
```terraform
44
+
resource "stackit_service_account" "sa" {
45
+
project_id = var.stackit_project_id
46
+
name = "sa01"
47
+
}
48
+
49
+
resource "time_rotating" "rotate" {
50
+
rotation_days = 80
51
+
}
52
+
53
+
// The access token is valid for 180 days but is configured to rotate every 80 days
// Trigger token rotation based on time_rotating changes.
61
+
rotate_when_changed = {
62
+
rotation = time_rotating.rotate.id
63
+
}
64
+
}
65
+
66
+
```
67
+
68
+
69
+
70
+
<!-- schema generated by tfplugindocs -->
71
+
## Schema
72
+
73
+
### Required
74
+
75
+
-`project_id` (String) STACKIT project ID associated with the service account token.
76
+
-`service_account_email` (String) Email address linked to the service account.
77
+
78
+
### Optional
79
+
80
+
-`rotate_when_changed` (Map of String) A map of arbitrary key/value pairs that will force recreation of the token when they change, enabling token rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
81
+
-`ttl_days` (Number) Specifies the token's validity duration in days. If unspecified, defaults to 90 days.
82
+
83
+
### Read-Only
84
+
85
+
-`access_token_id` (String) Identifier for the access token linked to the service account.
86
+
-`created_at` (String) Timestamp indicating when the access token was created.
87
+
-`id` (String) Unique internal resource ID for Terraform, formatted as "project_id,access_token_id".
88
+
-`token` (String, Sensitive) JWT access token for API authentication. Prefixed by 'Bearer' and should be stored securely as it is irretrievable once lost.
89
+
-`valid_until` (String) Estimated expiration timestamp of the access token. For precise validity, check the JWT details.
Schema for a STACKIT service account access token resource.`+"\n"+`
5
+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
6
+
## Example Usage`+"\n"+`
7
+
8
+
### Automatically rotate access tokens`+"\n"+
9
+
"```terraform"+`
10
+
resource "stackit_service_account" "sa" {
11
+
project_id = var.stackit_project_id
12
+
name = "sa01"
13
+
}
14
+
15
+
resource "time_rotating" "rotate" {
16
+
rotation_days = 80
17
+
}
18
+
19
+
// The access token is valid for 180 days but is configured to rotate every 80 days
0 commit comments