Skip to content

Commit

Permalink
Rename autobump token secret for github (#12128)
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperMalachowski authored and akiioto committed Oct 11, 2024
1 parent 6c9d4af commit 7f216b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ variable "kyma_autobump_bot_github_token_secret_name" {
default = "kyma-autobump-bot-github-token"
}

# TODO(kacpermalachowski): Rename to kyma_autobump_bot_github_token_secret_name after Prow removal
variable "kyma_autobump_bot_github_token_sm_secret_name" {
variable "kyma_bot_github_sap_token_secret_name" {
type = string
description = "Name of the kyma-autobump-bot-github-token secret in the Google's Secret Manager. This secret is used by automatic bumpers to interact with GitHub."
default = "workloads_default_kyma-autobump-bot-github-token"
default = "kyma-autobump-bot-github-token"
}

variable "kyma_bot_github_sap_token_secret_name" {
variable "kyma_bot_github_sap_token_prow_k8s_secret_name" {
type = string
description = "Name of the kyma-bot-github-sap-token secret. This is used by automation to interact with SAP GitHub instance."
default = "kyma-bot-github-sap-token"
Expand Down
6 changes: 3 additions & 3 deletions configs/terraform/environments/prod/kyma-bots-secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "kubernetes_cluster_role" "access_kyma_bot_github_tokens_trusted_worklo
rule {
api_groups = [""]
resources = ["secrets"]
resource_names = [var.kyma_autobump_bot_github_token_secret_name, var.kyma_bot_github_token_secret_name, var.kyma_bot_github_sap_token_secret_name, var.kyma_guard_bot_github_token_secret_name]
resource_names = [var.kyma_autobump_bot_github_token_secret_name, var.kyma_bot_github_token_secret_name, var.kyma_bot_github_sap_token_prow_k8s_secret_name, var.kyma_guard_bot_github_token_secret_name]
verbs = ["update", "get", "list", "watch", "patch", "create", "delete"]
}
}
Expand All @@ -27,7 +27,7 @@ resource "kubernetes_cluster_role" "access_kyma_bot_github_tokens_untrusted_work
rule {
api_groups = [""]
resources = ["secrets"]
resource_names = [var.kyma_autobump_bot_github_token_secret_name, var.kyma_bot_github_token_secret_name, var.kyma_bot_github_sap_token_secret_name, var.kyma_guard_bot_github_token_secret_name]
resource_names = [var.kyma_autobump_bot_github_token_secret_name, var.kyma_bot_github_token_secret_name, var.kyma_bot_github_sap_token_prow_k8s_secret_name, var.kyma_guard_bot_github_token_secret_name]
verbs = ["update", "get", "list", "watch", "patch", "create", "delete"]
}
}
Expand Down Expand Up @@ -72,5 +72,5 @@ resource "github_actions_variable" "kyma_autobump_bot_github_token_secret_name"
provider = github.kyma_project
repository = data.github_repository.test_infra.name
variable_name = "KYMA_AUTOBUMP_BOT_GITHUB_SECRET_NAME"
value = var.kyma_autobump_bot_github_token_sm_secret_name
value = var.kyma_bot_github_sap_token_secret_name
}

0 comments on commit 7f216b2

Please sign in to comment.