provider "aws" {
  region = var.aws_region
}

provider "github" {
  owner = "theorchard"
}

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

module "github_repositories" {
  source = "git@github.com:theorchard/terraform-github.git//?ref=2.1.8"

  github_repository_names = {
    youtube-audits = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = false
      archived_repository              = false
      github_code_owner_reviews        = true
      visibility                       = "private"
      description                      = "YouTube audits project repository."
      has_downloads                    = false,
      homepage_url                     = "https://github.com/theorchard/youtube-audits"
    }
  }

  github_push_teams = [
    "youtube-audit-team",
    "mergers",
  ]
}
