Skip to content

Commit

Permalink
feat: Add null_resource for updating .gitignore with new repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Arnold committed Aug 20, 2024
1 parent e1d7742 commit 07d5136
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,14 @@ module "repo_secrets" {
output "secrets" {
value = module.env_var
}


resource "null_resource" "gitignore" {
for_each = toset(formatlist("%s/%s", local.all_repos))
triggers = {
repo = each.value
}
provisioner "local-exec" {
command = "grep -q ${each.value} .gitignore || echo ${each.value} >> .gitignore"
}
}

0 comments on commit 07d5136

Please sign in to comment.