tencent cloud


Module Publish

Last updated: 2022-03-03 15:15:44


    Modules are Terraform configurations that allow you to manage a group of resources and can provide better business abstraction and lower costs in some multi-resource scenarios. In addition, you can publish modules on GitHub to the Terraform registry. This document describes how to create and publish a Terraform TencentCloud module.

    Creating a Public Module

    Create a code repository on GitHub and name it in the format of terraform-<provider>-<name>, such as terraform-tencentcloud-vpc.

    A basic module contains the following files:

    ├── main.tf # Write module resources
    ├── variables.tf # Declare module variables
    ├── outputs.tf # Declare module outputs
    ├── LICENCE # Declare license
    └── README.md # Readme

    You are advised to add the examples directory to store the examples for importing and using the module. For more information, visit.

    Publishing a Module


    • Click the drop-down arrow for Select Repository on GitHub to view the module repositories you are authorized to manage. Then, select a repository and click PUBLISH MODULE.

    • Your repository will be automatically synchronized to the Terraform registry in a few minutes.

    Note: You can also publish a module through a personal GitHub repository. The modules whose repositories are named in the format of terraform-tencentcloud-<name> will also be included in the tencentcloud modules.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support