iac_modules/terraform-hcl-standard/azure-cloud
google-labs-jules[bot] a2c2b95558 Standardize cloud bootstrap destroy process
- Added bootstrap destroy module structure for aws, ali, azure, gcp, and vultr.
- Moved AWS force destroy script to `terraform-hcl-standard/aws-cloud/modules/bootstrap-destroy/destroy.sh`.
- Updated `iac-pipeline-mutli-cloud-bootstrap..yaml` to dynamically invoke the destroy script based on the cloud provider.
- Added placeholders for other cloud providers.
2026-01-02 02:14:20 +00:00
..
bootstrap refactor: reorganize IaC modules and examples structure 2025-12-22 13:40:01 +08:00
config refactor: reorganize IaC modules and examples structure 2025-12-22 13:40:01 +08:00
envs/dev refactor: reorganize IaC modules and examples structure 2025-12-22 13:40:01 +08:00
modules Standardize cloud bootstrap destroy process 2026-01-02 02:14:20 +00:00
templates refactor: reorganize IaC modules and examples structure 2025-12-22 13:40:01 +08:00
README.md refactor: reorganize IaC modules and examples structure 2025-12-22 13:40:01 +08:00

Azure Cloud Terraform Standard

该目录提供与 aws-cloud 模板一一对应的 Azure 版本延续相同的目录与模块命名bootstrap、config、modules、envs便于将 AWS 使用习惯映射到 Azure。

模板映射AWS → Azure

  • bootstrap/state → Storage Account:创建存储账户与容器用于 Terraform 远端状态。
  • bootstrap/lock → Cosmos DB Table API:提供无服务器键值表存储。
  • bootstrap/identity → RBAC 角色分配:为指定主体分配内置角色,替代 AWS IAM 角色/策略。
  • modules:保留 AWS 模块命名,内部实现替换为 Azure 服务:
    • vpc:虚拟网络 + 子网Virtual Network/Subnet
    • alb应用程序网关Application Gateway
    • nlb标准负载均衡器Standard Load Balancer
    • ec2Linux 虚拟机Virtual Machine
    • s3存储账户与容器Storage Account + Container
    • rdsPostgreSQL 灵活服务器Flexible Server
    • redisAzure Cache for Redis。
    • sg网络安全组与规则Network Security Group
    • iam基于内置角色的角色分配Role Assignment
    • ami_lookup公共镜像查找Ubuntu 平台镜像)。
    • landingzone:基础资源组与日志工作区。
    • keypair:生成 SSH 密钥对。
    • msk:事件中心命名空间与 HubEvent Hubs

使用方式

  1. templates/backend.tf 中配置 Azure 存储作为 Terraform 远端状态(资源组、存储账户、容器)。
  2. templates/provider.tf 中设置 subscription_idtenant_idlocation 等参数。
  3. 参考 envs/dev/main.tf,按需修改变量后执行:
    terraform -chdir=envs/dev init
    terraform -chdir=envs/dev apply
    

本目录新增 Azure 代码,不改动现有 AWS 模板。