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

# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/github/lambda-switchboard-logs-to-es/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    = "lambda-switchboard-logs-to-es"
  description        = "Repo for switchboard-logs-to-es lambda."
  default_code_owner = "integrations"
  application_family = var.application_family

  branch_protection_patterns = ["master", "main"]
  require_branches_to_be_up_to_date = false
}
