provider "aws" {
  region = var.aws_region
}

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

module "github_repositories" {
  source             = "git@github.com:theorchard/terraform-github.git//?ref=3.0.0"
  application_family = "devops"
  github_repository_names = {
    pull-request-review-tools = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      description                      = "Tools for PR review automation"
      has_downloads                    = false
      homepage_url                     = "https://github.com/theorchard/pull-request-review-tools"
      repo_auto_init                   = true
      archived_repository              = false
      github_code_owner_reviews        = false
      visibility                       = "private"
    }
  }
}
