Forge Home

tfenv

Install and configure tfenv tool which manages terraform

10,057 downloads

9,437 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.1 (latest)
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Aug 11th 2017
This version is compatible with:
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'sergk-tfenv', '0.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sergk-tfenv
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sergk-tfenv --version 0.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

sergk/tfenv — version 0.2.1 Aug 11th 2017

tfenv

Puppet Forge Github Tag Build Status Coverage Status Puppet Forge Downloads

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with tfenv
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module installs and configures tfenv tool which manages terraform version

Module Description

The tfenv module sets up from the github repo tfenv utility which manages terraform version. Module creates user and group jenkins by default. This behavior can be changed.

Setup

What tfenv affects

By default:

  • Clone and install tfenv into /opt/tfenv folder;
  • Create user jenkins and group jenkins

Beginning with tfenv

include '::tfenv'

Usage

All options and configuration can be done through interacting with the parameters on the main ::tfenv class. The default parameters are defined in ::tfenv::params

tfenv class

To start using tfenv one can use simple inclusion:

include '::tfenv'

If you don't need to create user you should define this explicitly, but please ensure that both user tfenv_user and group tfenv_group exists, otherwise puppet run will fail:

class { '::tfenv':
  manage_user  => false,
  manage_group => false,
  tfenv_user   => root,
  tfenv_group  => root,
}

You can also provide custom installation directory as well as tfenv version:

class { '::tfenv':
  install_dir    => '/home/jenkins/tfenv',
  tfenv_revision => 'v0.5.1',
}

tfenv::terraform

If you want to install several versions of terraform you can use tfenv::terraform, e.g. install terraform versions '0.9.8', '0.9.9', '0.10.0':

include ::tfenv

$terraform_versions = ['0.9.8', '0.9.9', '0.10.0']

::tfenv::terraform { $terraform_versions: }

Reference

Classes

  • tfenv - Main class for installation and configuration.
  • tfenv::params - Different configuration data for module.

Defined resource

  • tfenv::terraform - install required version of terraform using tfenv tool

Limitations

Tested and work on:

  • CentOS 7
  • Ubuntu 14.04
  • Ubuntu 16.04
  • Debian Jessie

Development

Contributions will be gratefully accepted. All you pull requests should be done in separate branch, e.g. feature_abc, fix_version_issue, etc.