provider "aws" {
  region = var.aws_region
}

provider "github" {
  organization = var.github_organization
  app_auth {}
}

terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/github/graphql-switchboard/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

module "github_repositories" {
  source                     = "git@github.com:theorchard/terraform-github.git//?ref=6.1.4"
  repository_name            = "graphql-switchboard"
  description                = "graphql-switchboard"
  application_family         = var.application_family
  default_code_owner         = "content-creation-management-ccm"
  branch_protection_patterns = ["master"]
  delete_branch_on_merge     = true
  require_branches_to_be_up_to_date = false
}
