Git Product home page Git Product logo

tfmod's Introduction

Python Latest Tests License


Terraform module template

Create a Terraform module with CICD already setup.
Report Bug · Request Feature ·

About The Project

This "Hello World" module is a template and a guide to creating Terraform modules. Its purpose is to demonstrate Terraform module best practices and provide a template with CI/CD preconfigured.

Features

  • Local testing with pre-commit-terraform.
    • Formats code with terraform fmt.
    • Validates code with terraform validate.
    • Automatic README updates with terraform-docs.
    • Static code analysis with TFLint, tfsec and checkov.
  • Devcontainer with dependencies pre-configured.
  • CI pipeline with Github Actions:
    • Reuses Devcontainer to run the same checks that run locally.
    • Runs tests against the latest Terraform version.
    • Runs tests against older versions of Terraform.
  • CD pipeline with Github Actions:
  • Testing with Terratest across all major versions of Terraform.
  • Shows use of module composition by combining smaller modules
  • Shows how to use "Higher-order modules" to extend module functionality.

Getting Started

Usage

If you are creating a brand new module then using this template is pretty straight forward by using the GitHub guide.

If you are wanting to apply this template to an existing module then you will want to do the following:

  1. Copy the .devcontainer and .github directories.
  2. Update your README file/files to include the template value where you want the auto generated content from terraform-docs to go.

Regardless if you created a new module or updated an existing one, you will want to modify this entire README to be about YOUR module. Also update the CONTRIBUTING.md file with steps on how to contribute to YOUR module. The LICENSE file is optional if you are NOT publishing to the Terraform module registry.

Contributing

See CONTRIBUTING.md

License

Distributed under the Apache-2.0 License. See LICENSE for more information.

Contact

Levi - @shady_cuz

Acknowledgements



Everything below this line is generated via terraform-docs


Requirements

Name Version
terraform >= 0.12.0, < 2.0.0

Providers

No providers.

Modules

Name Source Version
make_exciting ./modules/make_exciting n/a
say_hello ./modules/say_hello n/a

Resources

No resources.

Inputs

Name Description Type Default Required
name The name of a person or thing to say hello to. string "World" no

Outputs

Name Description
greeting A very exciting greeting!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.