You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(partial; if the log's not sufficient, I'll encrypt my config and upload.)
data"null_data_source""lambda_vars" {
inputs={
output_path ="/tmp/route53-vpn-updater.${data.template_file.var_vpc_id.rendered}.zip"
}
}
## zip up the Lambda source file# https://github.com/hashicorp/terraform/issues/8344#issuecomment-265548941data"archive_file""route53_vpn_updater" {
type="zip"source_file="${path.module}/files/lambda_functions/vpn_ddns.py"output_path="${data.null_data_source.lambda_vars.outputs.output_path}"
}
## the Lambda function itselfresource"aws_lambda_function""route53_vpn_updater" {
## must match pattern:## (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?function_name="route53-vpn-updater_${data.template_file.var_vpc_label.rendered}"filename="${data.null_data_source.lambda_vars.outputs.output_path}"source_code_hash="${data.archive_file.route53_vpn_updater.output_base64sha256}"handler="vpn_ddns.lambda_handler"role="${var.ddns_lambda_role_arn}"runtime="python2.7"timeout=300kms_key_arn="${aws_kms_key.ddns-lambda.arn}"
}
Debug Output
Encrypted with security@hashicorp.com's PGP key; this is from a real run of one of my environments. terraform.log.gpg.zip
Expected Behavior
Lambda function should have been created from the archive file.
Actual Behavior
* aws_lambda_function.route53_vpn_updater: Unable to load "/tmp/route53-vpn-updater.prod_aws_gen_eu-west-1.zip": open /tmp/route53-vpn-updater.prod_aws_gen_eu-west-1.zip: no such file or directory
Steps to Reproduce
The apply worked fine on macOS 10.12.3, but failed in a CentOS 7 rkt container. The apply failed consistently enough in my CI environment that I was able to add the TF_LOG stuff to capture the output.
The text was updated successfully, but these errors were encountered:
Is it possible that the archive_file datasource is creating the file during plan but not during apply? I'm using separate plan and apply runs, with the output of the plan being used as the input of the apply, and running in different containers (so there's no shared filesystem state outside of the terraform directories).
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
v0.8.8
Affected Resource(s)
Terraform Configuration Files
(partial; if the log's not sufficient, I'll encrypt my config and upload.)
Debug Output
Encrypted with
security@hashicorp.com
's PGP key; this is from a real run of one of my environments.terraform.log.gpg.zip
Expected Behavior
Lambda function should have been created from the archive file.
Actual Behavior
Steps to Reproduce
The apply worked fine on macOS 10.12.3, but failed in a CentOS 7 rkt container. The apply failed consistently enough in my CI environment that I was able to add the
TF_LOG
stuff to capture the output.The text was updated successfully, but these errors were encountered: