Skip to content

Commit

Permalink
adding config + pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorOKane-Kainos committed Jul 4, 2024
1 parent 50fc558 commit eb77d9c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
id-token: write
contents: read

jobs:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 0 additions & 5 deletions components/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ locals {








locals {
env_display_names = {
sbox = "Sandbox"
Expand Down
6 changes: 3 additions & 3 deletions components/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "azurerm_storage_container" "tfstate" {

# Check if branches exist
data "github_branch" "existing_branches" {
for_each = { for combo in local.repo_branch_combinations : "${combo.repo}:${combo.branch}" => combo }
for_each = { for combo in local.repo_branch_combinations : "${combo.repo}:${combo.branch}" => combo }
repository = each.value.repo
branch = each.value.branch
}
Expand All @@ -43,7 +43,7 @@ resource "github_branch_protection_v3" "branch_protection" {

repository = each.value.repo
branch = each.value.branch
enforce_admins = false # Excludes organization admins
enforce_admins = false # Excludes organisation admins

required_status_checks {
strict = true
Expand All @@ -65,4 +65,4 @@ resource "github_branch_protection_v3" "branch_protection" {

output "existing_branches" {
value = data.github_branch.existing_branches
}
}
5 changes: 3 additions & 2 deletions test-repos.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"rule-set-test-repo1",
"rule-set-test-repo2",
"rule-set-test-repo3",
"rule-set-test-repo4"
]
"rule-set-test-repo4"
]

0 comments on commit eb77d9c

Please sign in to comment.