localstack / terraform-local

Terraform CLI wrapper to deploy your Terraform applications directly to LocalStack
Apache License 2.0
184 stars 21 forks source link

fix s3 path detection #27

Closed bentsku closed 12 months ago

bentsku commented 1 year ago

This PR would fix #26, or at least propose an easy workaround by setting S3_HOSTNAME=localstack while deploying with tflocal, which would force it to use s3_path_style=true. Right now, there's no easy way to force tflocal to use path style automatically except by setting the S3 endpoint to localhost.

I've improved the detection to be in line with LocalStack, where any request not starting with the s3. prefix would not be considered virtual host and would fail.