GithubHelp home page GithubHelp logo

kryndex / terraform-ppwcode-modules Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peopleware/terraform-ppwcode-modules

0.0 2.0 0.0 194 KB

Common Terraform modules.

License: Apache License 2.0

HCL 47.62% JavaScript 52.38%

terraform-ppwcode-modules's Introduction

This repository contains a number of general Terraform modules.

The Terraform documentation describes how to use modules. You import the modules from Github, as described in the documentation. Use the format for public Github repositories, using the "double-slash" to refer to the correct subdirectory.

module "MODULE_INSTANCE_NAME" {
    source = "github.com/peopleware/terraform-ppwcode-modules//MODULE_NAME"
}

On the other hand, โ€ฆ

The module domain_version/ directly, and thus the module subdomain/ that depends on it, uses a Node.js JavaScript script (though a Terraform external data source provider) to get information about the SOA serial and the state of the git repository of the Terraform configuration it is used in. Node.js JavaScript code depends on other npm packages, that need to be installed for the script to be able to work. This repository is therefor, apart from being a collection of Terraform modules, also a Node.js npm package, with dependencies described in package.json. The dependencies need to be available in a node_modules/ folder next to the script, or in one of its ancestor folders, before Terraform can use the modules in > terraform plan or > terraform apply.

This is done by running (preferred) > yarn or (legacy) > npm install in the project that uses these modules.

For this to work, this collection of Terraform modules / npm / yarn package must itself be loaded in the Terraform configuration in which it is used via > yarn (preferred) or > npm install (legacy). These commands work recursively.

This is done by making the configuration in which these modules are used an npm / yarn package itself, with this collection of Terraform modules defined as a development dependency in its package.json. Once > yarn (preferred) or > npm install (legacy) is executed, these modules will be available in node_modules/terraform-ppwcode-modules/. To create an instance of a module MODULE_NAME then, the Terraform configuration has to refer to it via a relative path, like this:

module "MODULE_INSTANCE_NAME" {
    source = "./node_modules/terraform-ppwcode-modules/MODULE_NAME"
}

Note to the Terraform maintainers: go with the flow, and promote npm / yarn as the primary method to distribute modules.

// TODO

@ppwcode/node-gitinfo should be updated asap, to use a more recent version of nodegit (because there is no pre-build binary for the latest node of the older version).

terraform-ppwcode-modules's People

Contributors

jandppw avatar

Watchers

 avatar  avatar

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.