From 6446a9d123ae5a401c382d486b4548469f96d6ac Mon Sep 17 00:00:00 2001 From: Florian Heuer Date: Fri, 22 Aug 2025 22:27:03 +0200 Subject: [PATCH] feature(iac): fix service-account module --- service-account/outputs.tf | 5 +++++ service-account/service-account.tf | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/service-account/outputs.tf b/service-account/outputs.tf index 3587015..753c387 100644 --- a/service-account/outputs.tf +++ b/service-account/outputs.tf @@ -1,3 +1,8 @@ +output "service_account_name" { + description = "The name of the service account" + value = var.service_account_name +} + output "service_account_email" { description = "The email of the service account" value = stackit_service_account.this.email diff --git a/service-account/service-account.tf b/service-account/service-account.tf index c7fdbeb..7bbcc0f 100644 --- a/service-account/service-account.tf +++ b/service-account/service-account.tf @@ -3,6 +3,10 @@ resource "stackit_service_account" "this" { project_id = var.stackit_project_id } +resource "time_rotating" "this" { + rotation_days = 3 +} + resource "stackit_service_account_key" "this" { count = var.service_account_create_key ? 1 : 0 @@ -13,7 +17,7 @@ resource "stackit_service_account_key" "this" { ttl_days = var.service_account_ttl_days } -resource "stackit_service_account_attachment" "this" { +resource "stackit_server_service_account_attach" "this" { count = var.attach_to_server ? 1 : 0 project_id = var.stackit_project_id