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

Refs platform/#3202 #13

Merged
merged 27 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fbbe40d
refs sparkfabrik-innovation-team/board#3202: manage secret in module
Stevesibilia Oct 15, 2024
766b4e3
feat: fix condition for remote repositories
Stevesibilia Oct 15, 2024
35e5093
fix: remote repositories condition
Stevesibilia Oct 15, 2024
7bcd56a
fix remote repositories condition
Stevesibilia Oct 15, 2024
0cf33dc
fix condition for remote repositories
Stevesibilia Oct 15, 2024
d21135b
fix remote repositories condition
Stevesibilia Oct 15, 2024
7b9a9d4
fix remote repositories condition
Stevesibilia Oct 15, 2024
e77ce6c
fix remote repository configs
Stevesibilia Oct 15, 2024
3548091
fix remote condition
Stevesibilia Oct 15, 2024
eceddd2
fix remote repositories conditions
Stevesibilia Oct 15, 2024
2173a5b
fix remote repositories conditions
Stevesibilia Oct 15, 2024
f7728c6
fix remote repositories conditions
Stevesibilia Oct 15, 2024
f6ab541
ref fix condition on remote repositories
Stevesibilia Oct 15, 2024
bfcd43d
fix remote repositories conditions
Stevesibilia Oct 15, 2024
1118185
fix
Stevesibilia Oct 15, 2024
4acffbd
fix
Stevesibilia Oct 15, 2024
0008db3
fix
Stevesibilia Oct 15, 2024
94773a9
fix
Stevesibilia Oct 15, 2024
1170a6b
fix
Stevesibilia Oct 15, 2024
5387fd9
fix remote repositories lookup
Stevesibilia Oct 15, 2024
a337a8b
fix: add secret name
Stevesibilia Oct 15, 2024
6b2f7a6
fix project id
Stevesibilia Oct 15, 2024
c341777
fix
Stevesibilia Oct 15, 2024
32d7623
fix
Stevesibilia Oct 15, 2024
629d434
fix default values in lookup
Stevesibilia Oct 15, 2024
05ee338
feat validation
Stevesibilia Oct 15, 2024
d6c63d5
feat update changelog
Stevesibilia Oct 15, 2024
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
Next Next commit
refs sparkfabrik-innovation-team/board#3202: manage secret in module
Stevesibilia committed Oct 15, 2024
commit fbbe40d6febf23f292b42f3a119fc62bf252472f
16 changes: 15 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -33,6 +33,20 @@ locals {
}
}
custom_role_artifact_registry_lister_id = "projects/${var.project_id}/roles/${var.artifact_registry_listers_custom_role_name}"
remote_repositories = {
for repository_id, repository in var.repositories : repository_id => {
repository_id = repository_id
username_password_credentials_password_secret_version = repository.username_password_credentials_password_secret_version
username_password_credentials_username = repository.username_password_credentials_username
}
if repository.mode == "REMOTE_REPOSITORY" && repository.username_password_credentials_password_secret_version != ""
}
}

data "google_secret_manager_secret" "remote_repository_secrets" {
for_each = local.remote_repositories

secret_id = each.value.username_password_credentials_password_secret_version
}

resource "google_artifact_registry_repository" "repositories" {
@@ -114,7 +128,7 @@ resource "google_artifact_registry_repository" "repositories" {
content {
username_password_credentials {
username = upstream_credentials.value.username_password_credentials_username
password_secret_version = upstream_credentials.value.username_password_credentials_password_secret_version
password_secret_version = data.google_secret_manager_secret.remote_repository_secrets[upstream_credentials.value.repository_id].name
}
}
}