provider "aws" {
  region = var.aws_region
}

terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/documents/auth0-m2m-secrets/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

module "m2m_secrets" {
  source             = "git@github.com:theorchard/terraform-secrets-manager.git//modules/auth0m2m?ref=1.6.1"
  for_each           = toset(var.function_names)
  environment        = var.environment
  service_name       = "${var.service_name}-${each.value}"
  application_family = var.application_family
}
