feature(iac): fix service-account module
This commit is contained in:
parent
61761c438a
commit
6446a9d123
2 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue