Skip to content

This is a Terraform template for all related modules we provide or use internally.

License

Notifications You must be signed in to change notification settings

xoap-io/terraform-module-template

Repository files navigation

Maintained Terraform License: MIT

Table of Contents


Introduction

This is a template for Terraform modules.

It is part of our XOAP Automation Forces Open Source community library to give you a quick start into Infrastructure as Code deployments with Terraform.

We have a lot of Terraform modules that are Open Source and maintained by the XOAP staff.

Please check the links for more info, including usage information and full documentation:


Guidelines

We are using the following guidelines to write code and make it easier for everyone to follow a distinctive guideline. Please check these links before starting to work on changes.

Contributor Covenant

Git Naming Conventions are an important part of the development process. They describe how Branches, Commit Messages, Pull Requests and Tags should look like to make them easily understandable for everybody in the development chain.

Git Naming Conventions

He Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of.

Conventional Commits

The better a Pull Request description is, the better a review can understand and decide on how to review the changes. This improves implementation speed and reduces communication between the requester, and the reviewer is resulting in much less overhead.

Writing A Great Pull Request Description

Versioning is a crucial part for Terraform Stacks and Modules. Without version tags you cannot clearly create a stable environment and be sure that your latest changes will not crash your production environment (sure it still can happen, but we are trying our best to implement everything that we can to reduce the risk)

Semantic Versioning

Terraform Naming Conventions


Share the Love

Like this project? Please give it a ★ on our GitHub! It helps us a lot.


Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

If you are interested in being a contributor and want to get involved in developing this project, we would love to hear from you! Email us.

PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

  • Fork the repo on GitHub
  • Clone the project to your own machine
  • Commit changes to your own branch
  • Push your work back up to your fork
  • Submit a Pull Request so that we can review your changes

NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!


Usage

Installation

For the first time using this template, necessary tools need to be installed. A script to prepare a Mac is provided under ./build/init.ps1

This script will install the following dependencies:

This script configures:

  • global git template under ~/.git-template
  • global pre-commit hooks for prepare-commit-msg and commit-msg under ~/.git-template/hooks
  • GitHub actions:
    • linting and checks for pull requests from dev to master/main
    • automatic tagging and release creation on pushes to master/main
    • dependabot updates

It currently supports the automated installation for macOS. Support for Windows and Linux will be available soon.

Synchronisation

We provided a script under ./build/sync_template.ps1 to fetch the latest changes from this template repository. Please be aware that this is mainly a copy operation which means all your current changes have to be committed first, and after running the script, you have to merge these changes into your codebase.

Configuration


Requirements

Name Version
terraform >=1.1.6
aws >= 4.5.0

Providers

No providers.

Modules

No modules.

Resources

No resources.

Inputs

Name Description Type Default Required
tags A list of tags to apply to the resource map(string) {} no

Outputs

No outputs.