I have written Terraform to create a Lambda function in AWS. This includes specifying my python code zipped. Running from Command Line into my tech box, all goes well. The terraform apply action sees my zip moved into AWS and used to create the lambda.
Key section of code :
resource "aws_lambda_function" "meta_lambda" {
filename = "get_resources.zip"
source_code_hash = filebase64sha256("get_resources.zip")
.....
Now, to get this into other environments, I have to push my Terraform via Azure DevOps. However, when I try to build in DevOps, I get the following :
Error: Error in function call on main.tf line 140, in resource "aws_lambda_function" "meta_lambda": 140: source_code_hash = filebase64sha256("get_resources.zip") Call to function "filebase64sha256" failed: no file exists at get_resources.zip.
I have a feeling that I am missing a key concept here as I can see the .zip in the repo - so do not understand how it is not found by the build?
Any hints/clues as to what I am doing wrong, gratefully welcome.
tree
first? – ydaetskcoR