provider "aws" {
  region = var.aws_region
}

# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/github/lambda-auth0-m2m/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        = var.service_name
  description            = "Lambdas for managing machine-to-machine (M2M) clients in Auth0."
  default_code_owner     = "permissions-platform-pp"
  application_family     = var.application_family
  delete_branch_on_merge = true

  github_pull_teams   = []
  github_triage_teams = ["orcharddevs-ro"]
  github_push_teams   = ["mergers"]

  branch_protection_patterns = ["master"]
}
