
data "terraform_remote_state" "mop_core" {
  backend = "s3"
  workspace = terraform.workspace
  config = {
    bucket = "nf-mop-tf-state"
    key = "core/terraform.tfstate"
    region = "us-east-1"
    encrypt = true
  }
}

# caller info
data "aws_caller_identity" "current" {}

## importing SSM params
data "aws_ssm_parameter" "iam_user_profile_internal_access_key_id" {
  name = "/${local.deploy_env_name}/iam/user/profile_internal/access_key_id"
}

variable failover_workspaces {
  default = {
    nf-sandbox          = "nf-sandbox-dr"
    nf-staging-int      = "nf-staging-dr"
    nf-prod-int         = "nf-production-dr"
  }
}
data "terraform_remote_state" "mop_core_failover" {
  backend = "s3"
  workspace = var.failover_workspaces[terraform.workspace]
  config = {
    bucket = "nf-mop-tf-state"
    key = "core-failover/terraform.tfstate"
    region = "us-east-1"
    encrypt = true
  }
}

