Overview
Strengths
Scenarios
terraform-<PROVIDER>-<NAME>, such as terraform-tencentcloud-vpc..├── main.tf # Write module resources├── variables.tf # Declare module variables├── outputs.tf # Declare module outputs├── LICENCE # Declare license└── README.md # Readme
example directory as instructed in terraform-tencentcloud-vpc/examples to store the examples for importing and using the module.

terraform-tencentcloud-<NAME> will also be included in the tencentcloud modules.
.github/workflow directory in the root directory of the repository and create the pull-request.yml file. Below is the sample code: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: Check whether the directory contains the file needed above.Terraform Validate: Check the module parameters.Terraform Format Check: Verify the Terraform code format in the module.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan