Coder Social home page Coder Social logo

iq-scm / terraform-provider-openfaas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ewilde/terraform-provider-openfaas

0.0 0.0 0.0 30.18 MB

Terraform OpenFaaS provider

License: Mozilla Public License 2.0

Shell 8.11% Go 76.62% Makefile 10.07% HTML 5.20%

terraform-provider-openfaas's Introduction

Terraform provider for OpenFaaS

Build Status

The terraform provider for OpenFaaS

Documentation

Full documentation, see: https://openfaas-tfe.edwardwilde.com/docs/providers/openfaas

Example Usage

resource "openfaas_function" "function_test" {
  name      = "test-function"
  image     = "functions/alpine:latest"
  f_process = "sha512sum"
  labels = {
    Group       = "London"
    Environment = "Test"
  }

  annotations = {
    CreatedDate = "Mon Sep  3 07:15:55 BST 2018"
  }
}

image

Building and Installing

Since this isn't maintained by Hashicorp, you have to install it manually. There are two main ways:

Download a release

Download and unzip the latest release.

Then, move the binary to your terraform plugins directory. The docs don't fully describe where this is.

  • On Mac, it's ~/.terraform.d/plugins/darwin_amd64
  • On Linux, it's ~/.terraform.d/plugins/linux_amd64
  • On Windows, it's $APPDATA\terraform.d\plugins\windows_amd64

Build using the Makefile

Install Go v1.9+ on your machine; clone the source, and let make install do the rest.

Mac

brew install go  # or upgrade
brew install dep # or upgrade
mkdir -p $GOPATH/src/github.com/ewilde; cd $GOPATH/src/github.com/ewilde
git clone https://github.com/ewilde/terraform-provider-openfaas 
cd terraform-provider-openfaas
make install
# it may take a while to download `hashicorp/terraform`. be patient.

Linux

Install go and dep from your favourite package manager or from source. Then:

mkdir -p $GOPATH/src/github.com/ewilde; cd $GOPATH/src/github.com/ewilde
git clone https://github.com/ewilde/terraform-provider-openfaas 
cd terraform-provider-openfaas
make install
# it may take a while to download `hashicorp/terraform`. be patient.

Windows

In PowerShell, running as Administrator:

choco install golang
choco install dep
choco install zip
choco install git # for git-bash
choco install make

In a shell that has Make, like Git-Bash:

mkdir -p $GOPATH/src/github.com/ewilde; cd $GOPATH/src/github.com/ewilde
git clone https://github.com/ewilde/terraform-provider-openfaas 
cd terraform-provider-openfaas
make install
# it may take a while to download `hashicorp/terraform`. be patient.

Developing the Provider

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of Acceptance tests, run make testacc.

Note: At the moment the acceptance tests assume OpenFaaS gateway is running on http://localhost:8080 without basic authentication enabled.

$ make testacc

Building the documentation

Currently a bit manual ¯_(ツ)_/¯

  1. build the content
$ make website-build
  1. copy build output into gh-pages branch of this repo
$ git checkout gh-pages 
cp -r ../terraform-website/content/build/docs/providers/openfaas/ ./docs/providers/openfaas

terraform-provider-openfaas's People

Contributors

ewilde 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.