Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tf localfiles support in brokerpak #231

Closed

Conversation

dmachard
Copy link
Contributor

Hi,

I submit you this pull request to support terraform localfiles in the brokerpak regarding the issue #114 .
The schema of the YAML services has been updated with a new action object "localfiles-refs" as part of a provision or bind action.

provision:
  template_ref: terraform/myservice/main.tf
  localfile_refs:
    - terraform/myservice/foo.bar
    - terraform/myservice/listips.tmpl
    - terraform/myservice/libcreate.py

After that local files can be used in terraform files like below

locals {
  listips = templatefile("${path.module}/listips.tmpl", { port = 8080, ip_addrs = ["10.0.0.1", "10.0.0.2"] })
}

data "local_file" "foo" {
    filename = "${path.module}/foo.bar"
}

resource "null_resource" "api" {
    provisioner "local-exec" {
        command = "python3 ${path.module}/libcreate.py"
    }
}

Denis

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/177866400

The labels on this github issue will be updated when the story is started.

@pivotal-marcela-campo
Copy link
Member

Closing this pull request as discussion in #114 is pointing us in a different direction.
Thanks @dmachard for your contribution. Hope to see more of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants