Terraform CLI and Provider Versions
Terraform v1.2.3
on darwin_amd64
- provider registry.terraform.io/hashicorp/archive v2.2.0
Terraform Configuration
data "archive_file" "input_archive" {
type = "zip"
source_file = "${path.module}/input.file"
output_path = "${path.module}/files/input.zip"
}
data "archive_file" "output_archive" {
type = "zip"
output_path = "${path.module}/files/output.zip"
source {
content = filebase64(data.archive_file.input_archive.output_path)
filename = "${data.archive_file.input_archive.output_path}"
}
}
Expected Behavior
Just for the sake of producing an working bug in the Terraform configuration we have the following:
- First "archive_file" creates a dummy archive 'input.zip' based on 'input.file'
- Second "archive_file" creates an 'output.zip' w/ base64 contents of 'input.zip' archive (since it's a binary file using filebase64 function)
Expected behaviour is that the input.zip archive that is archived within output.zip archive is valid and extractable.
Actual Behavior
When 'output.zip' archive is extracted, 'input.zip' is present but it's not extractable. Upon closer inspection it seems that it's still base64 encoded.
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
No response
Code of Conduct
Terraform CLI and Provider Versions
Terraform v1.2.3
on darwin_amd64
Terraform Configuration
Expected Behavior
Just for the sake of producing an working bug in the Terraform configuration we have the following:
Expected behaviour is that the input.zip archive that is archived within output.zip archive is valid and extractable.
Actual Behavior
When 'output.zip' archive is extracted, 'input.zip' is present but it's not extractable. Upon closer inspection it seems that it's still base64 encoded.
Steps to Reproduce
terraform applyHow much impact is this issue causing?
Medium
Logs
No response
Additional Information
No response
Code of Conduct