diff --git a/README.md b/README.md index 7234ce9f..62b3b138 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ Building The Provider Clone repository to: `$GOPATH/src/github.com/schoology/terraform-provider-consul-yaml` ```sh -$ mkdir -p $GOPATH/src/github.com/schoology; cd $GOPATH/src/github.com/schoology -$ git clone git@github.com:schoology/terraform-provider-consul-yaml +$ mkdir -p $GOPATH/src/schoology; cd $GOPATH/src/schoology +$ git clone https://github.com/schoology/terraform-provider-consul-yaml.git ``` Enter the provider directory and build the provider @@ -37,14 +37,8 @@ Developing the Provider If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.8+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`. -To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. +Once you have compiled the provider you can find binary in the `$GOPATH/bin` directory. To test with Terraform you will need to move the binary to your local plugin directory, located at `%APPDATA%\terraform.d\plugins` on Windows and `~/.terraform.d/plugins` on other systems. -```sh -$ make bin -... -$ $GOPATH/bin/terraform-provider-consul-yaml -... -``` In order to test the provider, you can simply run `make test`. diff --git a/consulyaml/resource_consul_key_prefix_from_file.go b/consulyaml/resource_consul_key_prefix_from_file.go index f77eb058..2ca06c30 100644 --- a/consulyaml/resource_consul_key_prefix_from_file.go +++ b/consulyaml/resource_consul_key_prefix_from_file.go @@ -100,6 +100,10 @@ func parseMapItem(item yaml.MapItem, subKeys map[string]string, parent string) { case int: // if we see an int, convert it to a string subKeys[key] = strconv.Itoa(v) + case bool: + // if we see an bool, convert it to a string + subKeys[key] = strconv.FormatBool(v) + case yaml.MapSlice: parseMapSlice(v, subKeys, key) case nil: diff --git a/examples/main.tf b/examples/main.tf index 72c1f828..7ed5dba7 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -1,6 +1,12 @@ +provider "consul" { + address = "127.0.0.1:8300" + datacenter = "dc1" +} + + resource "consul-yaml" "app" { datacenter = "dc1" - path_prefix = "prefix_test/" - subkeys_file = "../consulyaml/test-fixtures/cheese.yam" + path_prefix = "test/" + subkeys_file = "subkeys.yaml" }