archive-file

Is there a way to define multiple source_file for Terraform archive provider?

我们两清 提交于 2021-02-09 09:54:56
问题 I am using the Terraform archive_file provider to package multiple files into a zip file. It works fine when I define the archive like this: data "archive_file" "archive" { type = "zip" output_path = "./${var.name}.zip" source_dir = "${var.source_dir}" } However I don't want the archive to contain all of the files in var.source_dir , I only want a subset of them. I notice the archive_file provider has a source_file attribute so I was hoping I could supply a list of those files and package