# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/github/delphi-api-nginx/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

module "github_repositories" {
  source = "git@github.com:theorchard/terraform-github.git//?ref=2.1.4"
  github_repository_names = {
    delphi-api-nginx = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = false
      archived_repository              = false
      github_code_owner_reviews        = true
      visibility                       = "private"
      description                      = "Managed by Terraform."
      has_downloads                    = false
      homepage_url                     = ""
    }
  }

  github_push_teams  = ["delphi-team", "mergers", "delphi-be-team", "delphi-api-team"]

  allow_merge_commit = true

  branch_protection_required_status_checks = true
  github_code_owner_reviews                = false
}
