locals {

  service_name = "notification-service"

  env_account = terraform.workspace

  region = "us-east-1"

  health_check_path = "/actuator/health"
  env = {
    default = {
      short_name = "notification"
      service_name = "notification-service"
      container_port = 9301
      health_check_path = "/actuator/health/"
      iam_suffix = ""
      mail_username = "AKIAIDALHYYYXVRHZBWQ"
    }

    nf-sandbox = {
      subdomain = "sandbox.netfoundry.io"
      deploy_env_name = "sandbox"
      spring_config_label = "develop"
      role_arn = "arn:aws:iam::721086286010:role/ops-mgmt-admin"
    }

    nf-staging-int = {
      subdomain = "staging.netfoundry.io"
      deploy_env_name = "staging"
      spring_config_label = "staging"
      role_arn = "arn:aws:iam::560269805515:role/ops-mgmt-admin"
    }

    nf-prod-int = {
      subdomain = "production.netfoundry.io"
      deploy_env_name = "production"
      spring_config_label = "production"
      role_arn = "arn:aws:iam::745435643501:role/ops-mgmt-admin"
      mail_username = "AKIAJ4DDVLM7RTRAV4BA"
    }

  }

  environmentvars = contains(keys(local.env), terraform.workspace) ? terraform.workspace : "default"
  workspace       = merge(local.env["default"], local.env[local.environmentvars])
}
