Skip to content

Template repository for building a compatible Terraform module for Consul Terraform Sync

License

Notifications You must be signed in to change notification settings

hashicorp/consul-terraform-sync-template-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Template Module for Consul Terraform Sync

This repository is a template for structuring a compatible Terraform module for Consul Terraform Sync. The files contain standard sections and provide a guideline for writing documentation and framework for developing a module. You can clone this repository to begin building a module by following the structure and replacing instructions with content for your module.

The template repository includes:

  • README for module documentation
    • Rename the file README.tmpl.md to README.md to replace this file.
    • In the raw markdown of the file, there are HTML comments <!-- replace --> to indicate text that can be replaced with documentation for your module. The comments themselves can also be removed.
  • Standard module structure for Consul Terraform Sync
    • main.tf: the primary entry point for the module
    • variables.tf: contains variable declarations, including the required var.services for Consul Terraform Sync compatibility.

This repository has different branches that can be checked out to see templates for various features that may have different supported variable and documentation recommendations.

  • main branch: basic template for default services condition and intermediate input variables
  • catalog-services-condition-template branch: template for catalog-service condition

Visit Terraform documentation for detailed information on creating modules and the standard module structure. Details on Consul Terraform Sync specifications and requirements for modules are outlined in the official Consul docs. After you have completed and tested your module, you can share your module by publishing it on the Terraform Registry or a private registry.

A complete example of a compatible Terraform module can be referenced here.

Terraform Resources

Creating integrations for Consul Terraform Sync involves understanding Terraform and Terraform modules.

terraform.io is a great resource for learning Terraform. Below is a curated list of useful Terraform Learn tutorials to help you begin building a module.

Visit the project wiki to view additional resources specific to Consul Terraform Sync and Terraform, like transforming var.services and setting up an environment to test compatible modules.

About

Template repository for building a compatible Terraform module for Consul Terraform Sync

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages