telia-oss / concourse-tasks

Common concourse tasks.
MIT License
3 stars 5 forks source link

Feat: add Terraform variable(s) to task params #25

Closed mhd999 closed 5 years ago

mhd999 commented 5 years ago

The changes here to allow passing secrets as Terraform environment variables. The secrets can be fetched from a secret store like AWS secrets manager and used in Terraform script.

resource "aws_s3_bucket" "b" {
  bucket = "name"
  acl    = "private"

  tags {
    Name        = "${var.foo}"
    Environment = "${var.bar}"
  }
}
itsdalmo commented 5 years ago

Hey! Actually you can just pass TF_VAR_foo and TF_VAR_bar directly to params: in the task definition to get the same effect, since params: are passed as environment variables to the container. As such I don't think we need to merge this PR to get the functionality you need?

mhd999 commented 5 years ago

Alright! Then no need for this PR.