Git Product home page Git Product logo

17447's Introduction

Terraform code with git submodule code for community provider

This is simple TF code that consume git submodule for community provider plugin. The main goal is in one git repository's folders to link another git repository. In our case we link a community plug in shell (https://github.com/scottwinkler/terraform-provider-shell) so we can reuse it in multiple repositories but upload it one and thus save space.

Getting Started

These instructions will get you a example of how to use git submodule combine with TF code.

Prerequisites

Software needed to be installed:

Installing

First step is to clone this repository. Open you terminal according to your OS, change to your working directory and perform the following command:

Say what the step will be

git clone --recurse-submodules https://github.com/yaroslav-007/17447.git

When repository is cloned change your directory to the repo folder

cd 17447

Running the tests

To test if the code and clone of the github repo successful, we should run terraform init. This should initiate terraform and find all plug ins included the shell plugin deployed as git submodule

Performing the test

Run terraform init

terraform init

Test result

If everything is ok the output of the initiation should be:

Terraform has been successfully initialized!

We can check if the shell plugin is loaded:

 terraform providers 
.
├── provider.null
└── provider.shell

How the code was created

  • Two repos were created: 17447 and 17447-module. The firsts one contains the tf code and the second community provider shell.
  • To add the git submodule 17447-module in the main repo 17447, you perform the following command in your local cloned 17447: git submodule add <url to the submodule repo> <the path in your main repo where the submodule will be 'mounted">
git submodule add https://github.com/yaroslav-007/17447-module.git terraform.d/plugins
  • A new directory (in our case terraform.d ) will be created accordingly and new file named .gitmodules containing information regarding git submodule info. Commit those two files to the main repo.

17447's People

Contributors

yaroslav-007 avatar

Watchers

James Cloos 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.