Skip to content

Commit

Permalink
Merge pull request #29 from ucraft-com/terraform
Browse files Browse the repository at this point in the history
update module terraform
  • Loading branch information
devops-mher authored Mar 31, 2023
2 parents 4e6d3da + 0d5a720 commit d5d7568
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions github_branch_protection/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ resource "github_branch_protection" "branch" {
for_each = var.required_status_checks == null ? [] : [var.required_status_checks]

content {
strict = required_status_checks.value.strict
contexts = required_status_checks.value.contexts
strict = lookup(required_status_checks.value, "strict", false)
contexts = lookup(required_status_checks.value, "contexts", [])
}
}

dynamic "required_pull_request_reviews" {
for_each = var.required_pull_request_reviews != null ? [var.required_pull_request_reviews] : []
content {
restrict_dismissals = required_pull_request_reviews.value.restrict_dismissals
pull_request_bypassers = required_pull_request_reviews.value.pull_request_bypassers
require_last_push_approval = required_pull_request_reviews.value.require_last_push_approval
dismiss_stale_reviews = required_pull_request_reviews.value.dismiss_stale_reviews
dismissal_restrictions = required_pull_request_reviews.value.dismissal_restrictions
require_code_owner_reviews = required_pull_request_reviews.value.require_code_owner_reviews
required_approving_review_count = required_pull_request_reviews.value.required_approving_review_count
restrict_dismissals = lookup(required_pull_request_reviews.value, "restrict_dismissals", false)
pull_request_bypassers = lookup(required_pull_request_reviews.value, "pull_request_bypassers", [])
require_last_push_approval = lookup(required_pull_request_reviews.value, "require_last_push_approval", false)
dismiss_stale_reviews = lookup(required_pull_request_reviews.value, "dismiss_stale_reviews", false)
dismissal_restrictions = lookup(required_pull_request_reviews.value, "dismissal_restrictions", [])
require_code_owner_reviews = lookup(required_pull_request_reviews.value, "require_code_owner_reviews", false)
required_approving_review_count = lookup(required_pull_request_reviews.value, "required_approving_review_count", 0)
}
}

Expand Down

0 comments on commit d5d7568

Please sign in to comment.