Skip to content

Commit

Permalink
feat: resolve tflint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Kkhandale2024 committed Apr 1, 2024
1 parent 077ae31 commit 48b8686
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "google_service_account" "default" {
resource "google_service_account_key" "default" {
count = var.service_account_key_enabled && var.module_enabled ? 1 : 0

service_account_id = join("", google_service_account.default.*.name)
service_account_id = join("", [google_service_account.default[*].name])
key_algorithm = var.key_algorithm
public_key_type = var.public_key_type
private_key_type = var.private_key_type
Expand All @@ -40,7 +40,7 @@ resource "google_service_account_iam_binding" "admin-account-iam" {
count = var.google_service_account_iam_binding_enabled && var.module_enabled ? length(var.roles) : 0


service_account_id = join("", google_service_account.default.*.name)
service_account_id = join("", [google_service_account.default[*].name])
role = var.roles[count.index]
members = var.members
}
16 changes: 8 additions & 8 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@
# ------------------------------------------------------------------------------

output "email" {
value = join("", google_service_account.default.*.email)
value = join("", [google_service_account.default[*].email])
description = "The e-mail address of the service account."
}

output "name" {
value = join("", google_service_account.default.*.name)
value = join("", [google_service_account.default[*].name])
description = "The fully-qualified name of the service account."
}

output "unique_id" {
value = join("", google_service_account.default.*.unique_id)
value = join("", [google_service_account.default[*].unique_id])
description = "The unique id of the service account."
}

output "id" {
value = join("", google_service_account.default.*.id)
value = join("", [google_service_account.default[*].id])
description = "The id of the service account."
}

output "key_id" {
value = join("", google_service_account_key.default.*.id)
value = join("", [google_service_account_key.default[*].id])
description = "The id of the service account key."
}

output "key_name" {
value = join("", google_service_account_key.default.*.name)
value = join("", [google_service_account_key.default[*].name])
description = "The name of the service account key."
}

output "public_key" {
value = join("", google_service_account_key.default.*.public_key)
value = join("", [google_service_account_key.default[*].public_key])
description = "The public key, base64 encoded."
}

output "private_key" {
value = join("", google_service_account_key.default.*.private_key)
value = join("", [google_service_account_key.default[*].private_key])
description = "The private key in JSON format, base64 encoded."
}

0 comments on commit 48b8686

Please sign in to comment.