Skip to content

Commit

Permalink
fix: create svc acc token manually (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
krtk6160 authored Jan 3, 2023
1 parent e3e9ca2 commit 13b2ef9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion modules/smoketest/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@ resource "kubernetes_service_account" "smoketest" {
}
}

resource "kubernetes_secret" "smoketest_token" {
metadata {
name = "${local.smoketest_name}-token"
namespace = kubernetes_namespace.smoketest.metadata[0].name
annotations = {
"kubernetes.io/service-account.name" = kubernetes_service_account.smoketest.metadata[0].name
}
}

type = "kubernetes.io/service-account-token"
}

data "kubernetes_secret" "smoketest_token" {
metadata {
name = kubernetes_service_account.smoketest.default_secret_name
name = kubernetes_secret.smoketest_token.metadata[0].name
namespace = kubernetes_namespace.smoketest.metadata[0].name
}
}
Expand Down

0 comments on commit 13b2ef9

Please sign in to comment.