Skip to content

Commit

Permalink
feat: Add support for image_pull_secrets on service account (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs authored May 17, 2023
1 parent ae41721 commit afc511c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.1
rev: v1.79.1
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand Down
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ resource "kubernetes_service_account_v1" "this" {
labels = merge(var.labels, try(each.value.service_account.labels, {}))
}

dynamic "image_pull_secret" {
for_each = try(each.value.service_account.image_pull_secrets, [])

content {
name = secret.value.name
}
}

dynamic "secret" {
for_each = try(each.value.service_account.secrets, [])

Expand Down

0 comments on commit afc511c

Please sign in to comment.