provider "aws" {
  region = var.aws_region
}

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

module "github_repositories" {
  source                  = "git@github.com:theorchard/terraform-github.git//?ref=3.0.2"
  github_repository_names = {

    looker-youtube = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = false
      repo_auto_init                   = true
      archived_repository              = false
      github_code_owner_reviews        = false
      visibility                       = "private"
      description                      = "Looker Youtube Analytics project repository."
      has_downloads                    = false,
      homepage_url                     = "https://github.com/theorchard/looker-youtube"
    }
  }

  github_push_teams = [
    "data-analytics-eng",
    "mergers",
  ]

  github_repository_push_collaborators = {
    "looker-youtube" = [
      "acortad",
    ]
  }
  allow_merge_commit = true
  allow_rebase_merge = false
  allow_squash_merge = false
  application_family = "TBD"
}

