Giter Club home page Giter Club logo

terraform-provider-awx's Introduction

Terraform Provider AWX

_Fork from mrcrilly/terraform-provider-awx for develop additional functions.

Coming soon.

Local Development

1) Start a Local AWX instance in a kubernetes cluster

A fresh AWX instance is required for automated tests, so they can ensure terraform provider is working by targetting a live AWX instance.

A new instance can be re-created by invoking the reCreate mage target defined in tools/magefile.go. Once executed it will deploy an AWX instance to a Kubernetes cluster, using kind.

cd ./tools && go run mage.go -v reCreate && cd ..

2) Build Provider

  1. Ensure GoReleaser is installed
  2. Run build command:
goreleaser build --snapshot --rm-dist

3) Copy Provider

Copy the provider to user's ~/.terraform.d folder.

Important: if building the provider in an operating system other than Linux x86_64, adjust the paths below replacing linux_amd64 with the corresponding platform code. E.g.: darwin_amd64 for macOS.

mkdir -p ~/.terraform.d/plugins/github.com/denouche/awx/0.1/linux_amd64/terraform-provider-awx
find ./dist/terraform-provider-awx_linux_amd64/* -name 'terraform-provider-awx*' -print0 | xargs -0 -I {} mv {} ~/.terraform.d/plugins/github.com/denouche/awx/0.1/linux_amd64/terraform-provider-awx

4) Run tests and ensure they're all passing

go test ./test -count=1

Optional: All in one command

For convenience, all the steps above can be achieved by a single command that combines all of them:

goreleaser build --snapshot --rm-dist \
    && mkdir -p ~/.terraform.d/plugins/github.com/denouche/awx/0.1/linux_amd64/ \
    && find ./dist/terraform-provider-awx_linux_amd64/* -name 'terraform-provider-awx*' -print0 | xargs -0 -I {} mv {} ~/.terraform.d/plugins/github.com/denouche/awx/0.1/linux_amd64/terraform-provider-awx \
    && go test ./test -count=1

Update documentation

The files in ./docs folder are generated by executing the genDocumentation target defined in tools/magefile.go file:

cd ./tools && go run mage.go -v genDocumentation && cd ..

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.