Skip to content

equinix-labs/terraform-equinix-template

Repository files navigation

terraform-equinix-template

Experimental run-pre-commit-hooks generate-terraform-docs

terraform-equinix-template is a minimal Terraform module that utilizes Terraform providers for Equinix to provision digital infrastructure and demonstrate higher level integrations.

Usage

This project is experimental and supported by the user community. Equinix does not provide support for this project.

Install Terraform using the tfenv utility.

This project may be forked, cloned, or downloaded and modified as needed as the base in your integrations and deployments.

This project may also be used as a Terraform module.

To use this module in a new project, create a file such as:

# main.tf
terraform {
  required_providers {
    equinix = {
      source = "equinix/equinix"
    }
}

module "example" {
  source = "github.com/equinix-labs/template"
  # TEMPLATE: replace "template" with the name of the repo after the terraform-equinix- prefix.

  # Published modules can be sourced as:
  # source = "equinix-labs/template/equinix"
  # See https://www.terraform.io/docs/registry/modules/publish.html for details.

  # version = "0.1.0"

  # TEMPLATE: insert required variables here
}

Install pre-commit with its prerequesites: python and pip.

Configure pre-commit: pre-commit install.

Install required packages: tflint, tfsec, shfmt, shellcheck, and markdownlint.

Run terraform init -upgrade and terraform apply.

Module Documentation

The main README.md, the modules README.md and the examples README.md are populated by terraform-docs worflow job. The following sections are appended between the terraform-docs delimeters: Requiremenents, Providers, Modules, Resources, Inputs, and Outputs.

Module Release and Changelog Generation

The module git release and changelog are generated by the release workflow job. The release worflow follows the conventional commits convention. To submit a commit, please follow the commit message format guidelines. This job is set to run manually by default.

Example commit message: fix: disabled log generation for system services

For more examples, please see conventional commit message examples.

Examples

To view examples for how you can leverage this module, please see the examples directory.

Requirements

Name Version
terraform >= 1.3
equinix >= 1.8.0

Providers

Name Version
equinix >= 1.8.1

Modules

Name Source Version
inline-module ./modules/inline-module n/a

Resources

Name Type
equinix_metal_device.example resource

Inputs

Name Description Type Default Required
example_auth_token The example auth token value defines what will be included in the example resource in main.tf. This example is descriptive. string n/a yes
example_project_id The example project id value defines what will be included in the example resource in main.tf. This example is descriptive. string n/a yes

Outputs

Name Description
example_device_hostname The example output. In practice, output value reference implicit resource attributes declared in main.tf
example_gateway_id The example output. In practice, output value reference implicit resource attributes declared in main.tf

Contributing

If you would like to contribute to this module, see CONTRIBUTING page.

License

Apache License, Version 2.0. See LICENSE.

About

Template module for Equinix and Equinix Metal providers

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published