provider "aws" {
  region = var.aws_region
}

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

module "github_repositories" {
  source                     = "git@github.com:theorchard/terraform-github.git//?ref=5.0.0"
  repository_name            = "graphql-account"
  description                = "GraphQL Service for Account"
  default_code_owner         = "accounts-identities-platform-aka-user-platform"
  application_family         = var.application_family
  delete_branch_on_merge     = true
  github_code_owner_reviews  = true
  branch_protection_patterns = ["master", "main", "next"]

  github_push_teams = [
    "graphql-maintainers",
    "mergers",
    "permissions-platform-pp",
    "platform-eng",
  ]
}
