# OpenTofu 版本和提供商配置
terraform {
  required_version = ">= 1.6"
  
  required_providers {
    # Oracle Cloud Infrastructure
    oci = {
      source  = "oracle/oci"
      version = "7.20.0"
    }
    
    # 华为云
    huaweicloud = {
      source  = "huaweicloud/huaweicloud"
      version = "~> 1.60"
    }
    
    # Google Cloud Platform
    google = {
      source  = "hashicorp/google"
      version = "~> 5.0"
    }
    
    # DigitalOcean
    digitalocean = {
      source  = "digitalocean/digitalocean"
      version = "~> 2.0"
    }
    
    # Amazon Web Services
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
    
    # 其他常用提供商
    random = {
      source  = "hashicorp/random"
      version = "3.7.2"
    }
    
    tls = {
      source  = "hashicorp/tls"
      version = "4.1.0"
    }
    
    local = {
      source  = "hashicorp/local"
      version = "2.5.3"
    }
    
    # HashiCorp Vault
    vault = {
      source  = "hashicorp/vault"
      version = "~> 4.0"
    }
  }
  
  # 后端配置 - 可以使用 S3, GCS, 或本地
  backend "local" {
    path = "terraform.tfstate"
  }
}