Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename autobump token secret for github workflows #12128

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading