# ===============================================================================================================
# provider.tf - Configuración del proveedor AWS para proyectosacc
# Descripción:
#       Define la región y versiones del provider AWS para Terraform.
#
# Uso:
#       terraform init
#
# Autor: Área de Tecnología y Desarrollo - CCsoft
# ===============================================================================================================

terraform {
  required_version = ">= 1.5.0"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">= 5.94.0"
    }
    tls = {
      source  = "hashicorp/tls"
      version = ">= 4.0.0"
    }
  }
}

provider "aws" {
  region = var.aws_region

  default_tags {
    tags = {
      Project     = var.project_name
      ManagedBy   = "terraform"
      Environment = var.environment
    }
  }
}

# Provider exclusivo para ACM en us-east-1 (requerido por CloudFront)
provider "aws" {
  alias  = "us_east_1"
  region = "us-east-1"

  default_tags {
    tags = {
      Project     = var.project_name
      ManagedBy   = "terraform"
      Environment = var.environment
    }
  }
}


