Skip to content

Commit

Permalink
Creating secrets manager resource to store gha app secret for self ho…
Browse files Browse the repository at this point in the history
…sted runners
  • Loading branch information
caiocsgomes committed Jun 29, 2024
1 parent 229c106 commit 504fa32
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions terraform/environments/prod/secrets.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "aws_secretsmanager_secret" "gha_app_self_hosted_runner" {
name = "gha-app-self-hosted-runner"
}

variable "gha_app_self_hosted_runner_secret" {
type = object({
github_app_id = ""
github_app_installation_id = ""
github_app_private_key = ""
})
type = map(string)
}

resource "aws_secretsmanager_secret_version" "gha_app_self_hosted_runner" {
secret_id = aws_secretsmanager_secret.gha_app_self_hosted_runner.id
secret_string = jsonencode(var.gha_app_self_hosted_runner_secret)
}

0 comments on commit 504fa32

Please sign in to comment.