Skip to content

HanseMerkur/terraform-provider-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Provider Utilities

This repository contains utility functions, packages used in the other in-house developed Terraform providers. Common and core functionality is commited to this repository and used in other codebases.

This project is a component of Project Argo.

Project Info

This project is developed, owned, and maintained by the SRE - Orchestration pod at Wayfair.

This repository uses mkdocs for documentation and dep for dependency management. Dependencies are tracked as part of the repository.

Requirements:

Follow the setup instructions provided on the install sections of their respective websites. Windows environments should have a *nix-style terminal emulator installed such as Cygwin to be compatible with the makefile.

Repository Setup

After installing and configuring the toolchain listed in the Requirements section:

  1. Clone the repository with ssh:

    $ mkdir -p "${GOPATH}/src/github.com/wayfair"
    $ cd "${GOPATH}/src/github.com/wayfair"
    $ git clone git@github.com:wayfair/terraform-provider-utils.git
  2. Include the utility repo in your provider:

    Update your Gopkg.toml to include the repo as a dependency:

    # Gopkg.toml
    
    [[constraint]]
      name = "github.com/wayfair/terraform-provider-utils"
      # constraint to a specific version, release here:
      version = "=1.0.0"
    

    Include the needed package(s) to your source files:

    // resource_example_foo.go
    //
    // Example provider, foo resource
    
    package example
    
    import (
        // Import a specific subpackage from the repo, in this case 'example'.
        // Here, we don't define a pseudonym, so the package is accessible by
        // 'example'.
        "github.com/wayfair/terraform-provider-utils/example"
        // Here we are importing the 'example2' package under the pseudonym
        // 'ex'. It is available in this file as 'ex' not 'example2'
        ex "github.com/wayfair/terraform-provider-utils/example2"
    )
    
    // ...
    

    Update your repository to include the constraint with dep:

    $> dep ensure
    

Documentation

This repository uses mkdocs for documentation. Repository documentation can be found in the doc directory. Follow the installation instructions on mkdocs to get started.

To generate and view the entire repository's documentation:

$> mkdocs serve
INFO    -  Building documentation...
INFO    -  Cleaning site directory
[I 160402 15:50:43 server:271] Serving on http://127.0.0.1:8000
[I 160402 15:50:43 handlers:58] Start watching changes
[I 160402 15:50:43 handlers:60] Start detecting changes

The documentation can then be viewed by accessing localhost in your favorite browser or viewport.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages