Loading...
Loading...
### Terraform Version ```shell Terraform v1.5.7 ``` ### Terraform Configuration Files irrelevant ### Debug Output irrelevant ### Expected Behavior 1. have module in s3 ``` module "vm_xxx" { source = "s3::https://s3-eu-west-1.amazonaws.com/xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.0.tbz2" ... } ``` 2. run terraform init: ``` ... Downloading s3::https://s3-eu-west-1.amazonaws.com/xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.0.tbz2 for vm_xxx... - vm_xxx in .terraform/modules/vm_xxx ... ``` 3. be happy ### Actual Behavior I moved some of my modules to S3 as they can be served from there as described [here](https://developer.hashicorp.com/terraform/language/modules/sources#s3-bucket). As described archive can be of different extension as described in [section above](https://developer.hashicorp.com/terraform/language/modules/sources#fetching-archives-over-http). But when archive is in .tbz2 it doesn't work. With zip it's ok. ### Steps to Reproduce 1. have module ``` module "vm_xxx" { source = "s3::https://s3-eu-west-1.amazonaws.com/xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.0.tbz2" ... } ``` 2. run terraform init: ``` ╷ │ Error: Unreadable module directory │ │ The directory .terraform/modules/vm_xxx could not be read. This is a bug in Terraform and should be reported. ╵ ``` there is file: ``` ls -la .terraform/modules/vm_xxx -rw-rw-rw-@ 1 xxx staff 5005 Nov 22 15:56 .terraform/modules/vm_xxx ``` and it is archive because I can extract it manually, but it doesn't get extracted by terraform. With zip it works. ### Additional Context content of those two packages: ``` ➜ aws s3 cp s3://xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.1.zip . download: s3://xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.1.zip to ./aws-ec2-mssql-0.3.1.zip ➜ aws s3 cp s3://xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.0.tbz2 . download: s3://xxx-bucket/aws-ec2-mssql/aws-ec2-mssql-0.3.0.tbz2 to ./aws-ec2-mssql-0.3.0.tbz2 ➜ tar -tvjf aws-ec2-mssql-0.3.0.tbz2 drwxrwxrwx 0 root root 0 Nov 22 12:43 ./ -rw-rw-rw- 0 root root 3865 Nov 22 12:43 ./main.tf -rw-rw-rw- 0 root root 64 Nov 22 12:43 ./outputs.tf -rw-rw-rw- 0 root root 288 Nov 22 12:43 ./versions.tf -rw-rw-rw- 0 root root 58 Nov 22 12:43 ./locals.tf -rw-rw-rw- 0 root root 1606 Nov 22 12:43 ./data.tf -rw-rw-rw- 0 root root 419 Nov 22 12:43 ./variables.tf ➜ unzip -t aws-ec2-mssql-0.3.1.zip Archive: aws-ec2-mssql-0.3.1.zip testing: main.tf OK testing: outputs.tf OK testing: versions.tf OK testing: locals.tf OK testing: data.tf OK testing: variables.tf OK No errors detected in compressed data of aws-ec2-mssql-0.3.1.zip. ``` ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.