Closed ari-becker closed 3 years ago
I haven't tried using the new across
feature, but I can't imagine the Concourse team intends for every resources to add support for a bunch of new _filename
properties. What about using a put alias:
- put: terraform-((.:environment))
resource: terraform
If that doesn't work please open an issue on the Concourse repo to see how they would recommend handling this.
The team made it clear that the across
step limits scope not just for the variable but also for the artifacts created per variable value, so this is irrelevant. Thanks anyway
Request
Currently, when using
put.get_params.output_planfile: true
, the resource will create a file calledplan.json
with the plan output. Similarly, when running theput
, filesname
andmetadata
will be created with theenv_name
and Terraform Outputs. None of these filenames can currently be changed - I cannot changeplan.json
toplan-X.json
,name
toname-X
, ormetadata
tometadata-X
.To be able to change the name of the files, I would like to be able to define the following options:
put.name_filename: <string>
put.metadata_filename: <string>
put.get_params.output_planfile_filename: <string>
Why?
Concourse is adding an
across
step that allows for many steps to be executed in parallel across a dynamic range of values. Together with a task that runsterraform workspace list
, this means that a pipeline can do something like:Which allows the Concourse pipeline to dynamically run a
terraform plan
for each and every workspace. But for this to work, the Terraform resource needs to be configured appropriately so that the different instantiations of the resource don't clobber each others' plan / name / metadata files.