1
0
Fork 0
llvm-premerge-checks/terraform/secrets.tf
Grigory Movsesyan ba66080689
Add secrets support and instruction for budget notifications (#444)
* Move to secrets

* Add billing actions
2023-05-26 12:15:44 +02:00

26 lines
No EOL
727 B
HCL

locals {
secrets = {
"buildkite-api-token-readonly": var.buildkite-api-token-readonly,
"buildkite-agent-token": var.buildkite-agent-token,
"conduit-api-token": var.conduit-api-token,
"git-id-rsa": var.git-id-rsa,
"id-rsa-pub": var.id-rsa-pub,
"git-known-hosts": var.git-known-hosts
}
}
resource "google_secret_manager_secret" "secret" {
for_each = local.secrets
secret_id = each.key
replication {
automatic = true
}
depends_on = [google_project_service.google_api]
}
resource "google_secret_manager_secret_version" "secret_version" {
for_each = local.secrets
secret = google_secret_manager_secret.secret[each.key].id
secret_data = each.value
}