data "archive_file" "example" {
type = "zip"
output_path = "${local.dest_dir}/hello_upload.zip"
source_file = "${local.src_dir}/hello.py"
source_dir = "${local.src_dir}/pytz"
source_dir = "${local.src_dir}/pytz-2018.5.dist-info"
}
note that hello.py need to import pytz which is not included in Lambda that is why I want to upload the package.
when I run the above terraform I got error: "source_dir": conflicts with source_file. Then How can I upload both my lambda file hello.py and the package pytz which is a directory?