provider "aws" {
  region = var.aws_region
}

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

module "group_with_attachments" {
  source = "git@github.com:theorchard/terraform-iam-policies.git//modules/groups?ref=1.18.0"

  group_name = "songwhip"
  users = [
    "ahendin",
    "apred",
    "apryschepa",
    "mymac80",
    "msolvag",
  ]
  application_families_to_access = [
    "songwhip",
  ]
  iam_roles_to_access = [
    "arn:aws:iam::619719722105:role/songwhip-role", # songwhip-qa
    "arn:aws:iam::926734670777:role/songwhip-role", # songwhip-prod
  ]
}
