terraform-provider-fleet

command module
v0.0.0-...-895ca59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2015 License: ISC Imports: 15 Imported by: 0

README

terraform-provider-fleet

A plugin for Terraform enabling it to manipulate Fleet (CoreOS) units.

Circle CI

Installation

  1. Install Terraform.
  2. go get github.com/paperg/terraform-provider-fleet

Usage

There is only one resource: fleet_unit. Here is the first example from the Fleet introduction, transcribed to Terraform:

provider "fleet" {
    tunnel_address = "IP_OR_HOSTNAME_OF_A_COREOS_HOST"
}

resource "fleet_unit" "myapp" {
    name = "myapp.service"
    desired_state = "launched" // "inactive", "loaded", or "launched"
    section {
        name = "Unit"

        option {
            name = "Description"
            value = "MyApp"
        }

        option {
            name = "After"
            value = "docker.service"
        }

        option {
            name = "Requires"
            value = "docker.service"
        }
    }

    section {
        name = "Service"

        option {
            name = "TimeoutStartSec"
            value = "0"
        }

        option {
            name = "ExecStartPre"
            value = "-/usr/bin/docker kill busybox2"
        }

        option {
            name = "ExecStartPre"
            value = "-/usr/bin/docker rm busybox2"
        }

        option {
            name = "ExecStartPre"
            value = "/usr/bin/docker pull busybox"
        }

        option {
            name = "ExecStart"
            value = "/usr/bin/docker run --name busybox2 busybox /bin/sh -c 'while true; do echo Hello World; sleep 1; done'"
        }

        option {
            name = "ExecStop"
            value = "/usr/bin/docker busybox2"
        }
    }
}

API stability

Both Terraform and Fleet are 0.x projects. Expect incompatible changes.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL