cloudposse / cloudposse/terraform-aws-datadog-lambda-forwarder
Call to function "filebase64sha256" failed: open ../../modules/datadog-lambda-forwarder-dev/forwarder-log.zip: no such file or directory.
- Dominant language
- HCL
- Stars
- 20
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
Any attempts to use this module do not work with the error in the issue title.
```
╷
│ Error: Error in function call
│
│ on .terraform/modules/datadog_lambda_forwarder.forwarder_log_artifact/outputs.tf line 18, in output "base64sha256":
│ 18: value = module.this.enabled && local.external_curl_filename_effective != "" ? filebase64sha256(local.external_curl_filename_effective) : ""
│ ├────────────────
│ │ while calling filebase64sha256(path)
│ │ local.external_curl_filename_effective is "../../modules/datadog-lambda-forwarder-dev/forwarder-log.zip"
│
│ Call to function "filebase64sha256" failed: open
│ ../../modules/datadog-lambda-forwarder-dev/forwarder-log.zip: no such file
│ or directory.
```
### Expected Behavior
The module works.
### Steps to Reproduce
Any attempts to use this module resulted in the error text in the "Describe the Bug" section.
Workarounds attempted:
- Downgrading from the most recent version to 1.5.1 (chosen arbitrarily.)
- Changing the variable `forwarder_log_artifact_url` to a local `file://` URL, to the datadog artifact Git repository, and to a direct link to the ZIP artifact file.
- Trying different versions for the variable
- Directly including the `curl` module as a dependency
Terraform code:
```
module "datadog_lambda_forwarder" {
source = "../../modules/datadog-lambda-forwarder-dev"
dd_api_key_source = {
resource = "ssm"
identifier = "/datadog/datadog_api_key"
}
dd_forwarder_version = "3.129.0" # Fails either when this value is not provided or when it is
dd_tags = ["project:${var.environment}-${var.region}-platform-waf"]
environment = var.environment
forwarder_log_enabled = true
name = "Datadog-Lambda-Forwarder-xxxxxx"
s3_buckets = [ module.waf_log_bucket.bucket_id ]
}
```
### Screenshots
_No response_
### Environment
- OS: `ruby:latest` container, so Debian.
- Module version: 1.7.0, 1.5.1
- Terraform version: OpenTofu, last updated October 28
We also wrap the build process with Terraspace.
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.