I need to archive a directory from my gitlab repo using terraform in order to use the ZIP file in an aws lambda function.
when putting a url in the source attribute it errors:
Error: error archiving file: could not archive missing file: https://*********/lambda.py
my Terraform code for archiving the file is:
data "archive_file" "init" {
type = "zip"
output_path = "${path.module}/example.zip"
source_file = "https://*********/lambda.py"
}
so obviously this is not the right way to do it, didn't find anything regarding this online, is there a proper way to do this using Terraform?