orange-cloudfoundry / terraform-release

Terraform bosh release. enables terraform automation from bosh
Apache License 2.0
1 stars 0 forks source link

Support for modules and named tf spec files #8

Open gberche-orange opened 4 years ago

gberche-orange commented 4 years ago

expected behavior

As a terraform-release user

https://www.terraform.io/docs/modules/index.html#module-structure

To define a module, create a new directory for it and place one or more .tf files inside just as you would do for a root module. Terraform can load modules either from local relative paths or from remote repositories;

observed bevahior

https://github.com/orange-cloudfoundry/terraform-release/blob/e75d64824d98ec83601afa01ebc3d74914733aa0/jobs/terraform-apply/spec#L23-L25

Possible improvement

  terraform.specs:
    description:
      map of inline terraform configuration to apply keyed by relative file path
   example:
     - flat-config.tf: "inlined-tf-config content"
     - module/config.tf: "inlined-tf-config content"
     - module/submodule/config.tf: "inlined-tf-config content"
     - "if ever needed config file name with special characters such as : ! # chars.tf": "inlined-tf-config content"

Note that the following yaml block is valid against YAML specs