产品概述
产品优势
应用场景
terraform-<PROVIDER>-<NAME>,例如 terraform-tencentcloud-vpc。.├── main.tf # 编写模块资源├── variables.tf # 声明模块变量├── outputs.tf # 声明模块输出├── LICENCE # 声明许可└── README.md # 自述文件


terraform-tencentcloud-<NAME>,则该 Modules 也会收录在 tencentcloud 的 Modules 中。
name: MR_CHECKon:pull_request:branches: [ master ]workflow_dispatch:jobs:build:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v2- uses: hashicorp/setup-terraform@v1- name: Module Files Checkingrun: |files=(LICENSEmain.tfversion.tfvariables.tfoutputs.tfREADME.md)test -d examples || echo "[WARN] Missing ./examples in modules directory, we strongly recommend you to provide example usage of this module."for i in ${files[@]} ; dofileCount=$(find ./ -name $i | wc -l)if [[ $fileCount -gt 0 ]]; thenecho "[INFO] File: $i exist."elseecho "[ERROR] Missing $i, a recommend module should include these files:\\n ${files[@]}"exit -1fidone- name: Terraform Validaterun: |terraform initterraform validate- name: Terraform Format Checkrun: |terraform fmt -diff -check -recursive
Module Files Checking:检查该目录下是否包含上文中需要的文件。Terraform Validate:进行 Module 参数检查。Terraform Format Check:校验 Module 中的 tf 代码格式。文档反馈