docker-archive / deploykit

A toolkit for creating and managing declarative, self-healing infrastructure.
Apache License 2.0
2.25k stars 262 forks source link

Terraform show output parsing code returns flattened slice #629

Closed kaufers closed 7 years ago

kaufers commented 7 years ago

The terraform show output flattens everything, for example a map is returned like:

  tags.%           = 1
  tags.provisioner = infrakit-terraform-demo

And a list is returned like:

  tags.#          = 2
  tags.1516831048 = infrakit.group:workers
  tags.3434794676 = infrakit.config_sha:tubmesopo6lrsfnl5otajlpvwd23v46j

However, the current parsing code does convert this into the native map or slice, see https://github.com/docker/infrakit/blob/master/pkg/provider/terraform/instance/show_test.go#L104-L105

Moreover, all values are of type string vs. int, bool, etc.

We need to update the show output to return a TResourceProperties object that has the native types.

kaufers commented 7 years ago

Fixed via https://github.com/docker/infrakit/pull/630