provider "aws" {
  region = var.aws_region
}

# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/github/insights-search/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        = "insights-search"
  description            = "Insights search lambda code"
  application_family     = "insights"
  default_code_owner     = "insights"
  homepage_url           = "https://github.com/theorchard/insights-search-lambdas"
  pull_request_bypassers = ["sugarandmagic"]
  github_pull_teams      = []
  github_triage_teams    = ["orcharddevs-ro"]
  github_push_teams      = ["mergers"]
}

module "github_repositories_art_relations_entity_types" {
  source                 = "git@github.com:theorchard/terraform-github.git//?ref=5.0.0"
  repository_name        = "art-relations-entity-types"
  description            = "Types library for Art Relations entities, used by Insights Search"
  application_family     = "insights"
  default_code_owner     = "insights"
  homepage_url           = "https://github.com/theorchard/art-relations-entity-types"
  pull_request_bypassers = ["sugarandmagic"]
  github_pull_teams      = []
  github_triage_teams    = ["orcharddevs-ro"]
  github_push_teams      = ["mergers"]
}
