terraform-provisioner-chef-solo

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: MPL-2.0 Imports: 2 Imported by: 0

README

terraform-provisioner-chef-solo

This is a Terraform provisioner plugin for Chef Solo. It lets us provision instances with Chef Solo in our Terraform scripts:

resource "aws_instance" "web" {
  # ...

  provisioner "chef-solo" {
    cookbook_paths  = ["cookbooks"]
    run_list        = ["book::recipe"]
    json            = <<-EOF
      {
        "a": "b",
        "c": "d"
      }
    EOF
  }
}

It's inspired by the similar Packer provisioner for Chef Solo, so if you're familiar with that one, then you'll be familiar with this one!

Usage

To use this provisioner, first download the zipped binary for your system from the releases page and unzip it. Alternatively, you can build it yourself (see below).

Terraform searches for plugins within the same directory as itself, so you'll have to move this binary into that directory. If you're using an older version of Terraform, you'll also have to rename the plugin to not include the version information at the end of the name.

Documentation for the plugin is here.

Building

However you put Go projects into your GOPATH (whether it's with go get or just manually cloning and moving it), do that for this project.

Since this is a plugin for Terraform, you need to have the Terraform source in your GOPATH too. If you don't, run a go get -v ./... from the root of this repo.

Here's an example:

$ go get github.com/andreykaipov/terraform-provisioner-chef-solo
$ cd $GOPATH/src/github.com/andreykaipov/terraform-provisioner-chef-solo
$ make build

You should now have the plugin in the bin/ directory.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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