Skip to content

Commit 63f9ecf

Browse files
committed
feat: implement sa access token resource
1 parent a88efd3 commit 63f9ecf

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

docs/resources/service_account_access_token.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ description: |-
1717
rotation_days = 80
1818
}
1919
20-
// The access token is valid for 180 days but is configured to rotate every 80 days
21-
// when a Terraform apply is triggered.
2220
resource "stackit_service_account_access_token" "sa1" {
2321
project_id = var.stackit_project_id
2422
service_account_email = stackit_service_account.sa.email
2523
ttl_days = 180
2624
27-
// Trigger token rotation based on time_rotating changes.
2825
rotate_when_changed = {
2926
rotation = time_rotating.rotate.id
3027
}
@@ -50,14 +47,11 @@ resource "time_rotating" "rotate" {
5047
rotation_days = 80
5148
}
5249
53-
// The access token is valid for 180 days but is configured to rotate every 80 days
54-
// when a Terraform apply is triggered.
5550
resource "stackit_service_account_access_token" "sa1" {
5651
project_id = var.stackit_project_id
5752
service_account_email = stackit_service_account.sa.email
5853
ttl_days = 180
5954
60-
// Trigger token rotation based on time_rotating changes.
6155
rotate_when_changed = {
6256
rotation = time_rotating.rotate.id
6357
}

stackit/internal/services/serviceaccount/serviceaccount_acc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestServiceAccount(t *testing.T) {
6666
ProtoV6ProviderFactories: testutil.TestAccProtoV6ProviderFactories,
6767
CheckDestroy: testAccCheckServiceAccountDestroy,
6868
Steps: []resource.TestStep{
69-
// Create
69+
// Creation
7070
{
7171
Config: inputServiceAccountResourceConfig(serviceAccountResource["name01"]),
7272
Check: resource.ComposeAggregateTestCheckFunc(

stackit/internal/services/serviceaccount/token/const.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@ resource "time_rotating" "rotate" {
1616
rotation_days = 80
1717
}
1818
19-
// The access token is valid for 180 days but is configured to rotate every 80 days
20-
// when a Terraform apply is triggered.
2119
resource "stackit_service_account_access_token" "sa1" {
2220
project_id = var.stackit_project_id
2321
service_account_email = stackit_service_account.sa.email
2422
ttl_days = 180
2523
26-
// Trigger token rotation based on time_rotating changes.
2724
rotate_when_changed = {
2825
rotation = time_rotating.rotate.id
2926
}

0 commit comments

Comments
 (0)