provider "aws" {
  region = var.aws_region
}

# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/github/terraform-infra-cleanup-tool/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

module "github_repositories" {
  source = "git@github.com:theorchard/terraform-github.git//?ref=2.2.0"
  github_repository_names = {
    terraform-infra-cleanup-tool = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = true
      archived_repository              = true
      github_code_owner_reviews        = false
      visibility                       = "private"
      description                      = "Cleanup tool for terraform-infra's Atlantis and Checkov comments"
      has_downloads                    = false
      homepage_url                     = "https://github.com/theorchard/terraform-static-code-analysis"
    }
  }
  application_family = "devops"
}
