vburckhardt / terraform-ibm-module-template

Template for starting a new module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform IBM Module Template

Build Status semantic-release pre-commit

Submit a new module

πŸ‘πŸŽ‰ Thank you for taking the time to contribute! πŸŽ‰πŸ‘

This template repository exists to help you create Terraform modules for IBM Cloud.

The default structure includes the following files:

  • README.md: A description of the module
  • main.tf: The logic for the module
  • version.tf: The required terraform and provider versions
  • variables.tf: The input variables for the module
  • outputs.tf: The values that are output from the module

You can add other content to support what your module does and how it works. For example, you might add a scripts/ directory that contains shell scripts that are run by a local-exec null_resource in the Terraform module.

Follow this process to create and submit a Terraform module.

Create a new repo from this repo template

Create a new repository from this repository template by clicking Use this template in the GitHub UI (top right). For more information about creating a repository from a template, see the GitHub docs.

Clone the repo and set up your development environment

Locally clone the new repository and set up your development environment by completing the tasks in [coming soon]

Update the Terraform files

Implement the logic for your module by updating the main.tf, version.tf, variables.tf, and outputs.tf Terraform files. For more information, see Creating Terraform on IBM Cloud templates.

Create examples and tests

Add one or more examples in the examples directory that consume your new module, and configure tests for them in the tests directory.

Update the content in the readme file

After you implement the logic for your module and create examples and tests, update this readme file in your repository by following these steps:

  1. Update the title heading and add a description about your module.
  2. Update the badge links.
  3. Remove all the content in this H2 heading section.
  4. Complete the Usage, Required IAM access policies and Examples sections. The Requirements section is populated by a pre-commit hook.

Commit your code and submit your module for review

  1. Before you commit any code, review the contributing guidelines [coming soon]
  2. Create a pull request for review

Post-merge steps

After the first PR for your module is merged, follow these post-merge steps:

  1. Create a PR to enable the upgrade test by removing the t.Skip line in tests/pr_test.go.

Usage

Required IAM access policies

You need the following permissions to run this module.

  • Account Management
    • Sample Account Service service
      • Editor platform access
      • Manager service access
  • IAM Services
    • Sample Cloud Service service
      • Administrator platform access

Examples

Requirements

Name Version
terraform >= 1.0.0

Modules

No modules.

Resources

No resources.

Inputs

No inputs.

Outputs

No outputs.

Developing

To set up your local development environment, see steps [coming soon]

About

Template for starting a new module

License:Apache License 2.0


Languages

Language:Go 54.5%Language:HCL 43.5%Language:JavaScript 2.0%