Coder Social home page Coder Social logo

rsnyman / terraform-provider-haproxy-pf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcomezzaro/terraform-provider-haproxy-pf

0.0 0.0 0.0 108 KB

A Terraform provider for HAproxy

License: Mozilla Public License 2.0

Go 99.23% Makefile 0.17% HCL 0.47% Dockerfile 0.14%

terraform-provider-haproxy-pf's Introduction

Terraform Provider Haproxy

This provider uses Haproxy Dataplane api in order to manage Terraform objects.

Built with Terraform plugin framework.

Checklist:

  • Backend
  • Frontend
  • Bind
  • Server
  • Server Template

TODO:

  • ACL
  • More resource options

Dev Build provider

set terraformrc file with dev_overrides

# ~/.terraformrc 
provider_installation {

  dev_overrides {
      "registry.terraform.io/marcomezzaro/haproxy-pf" = "<GOPATH>/bin/"
  }

  # For all other providers, install them directly from their origin provider
  # registries as normal. If you omit this, Terraform will _only_ use
  # the dev_overrides block, and so no other providers will be available.
  direct {}
}

Run the following command to build the provider

$ make install

build and run haproxy for testing

podman build -t haproxy-dp -f docker/Dockerfile docker/
podman run -it --rm -p 5555:5555 --name haproxy localhost/haproxy-dp:latest

Run ACC Test

TF_ACC=1 HAPROXY_SERVER="localhost:5555" HAPROXY_USERNAME="admin" HAPROXY_PASSWORD="adminpwd" HAPROXY_INSECURE="true" go test -v -cover -count 1 ./haproxy/

Generate doc

go generate ./...

Test sample configuration

First, build and install the provider.

$ make install

Then, navigate to the examples directory. and use the example to create terraform manifests

$ cd examples

Run the following command to initialize the workspace and apply the sample configuration.

$ terraform init && terraform apply

Special Thanks

https://github.com/matthisholleville

terraform-provider-haproxy-pf's People

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.