Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ provider "aws" {
We would also need to avoid issues with routing and authentication (as we do not need it).
Therefore we need to supply some general parameters.
Additionally, we have to point the individual services to LocalStack.
We can do this by specifying the `endpoints` parameter for each service, that we intend to use.
We can do this by specifying the `endpoints` parameter for each service that we intend to use.

When using LocalStack, set `s3_use_path_style = true` so that S3 requests use path-style URLs, which LocalStack expects for the local endpoint.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi I'm a bit confused here. The original setting of s3_use_path_style = false did work - are you saying true is the more correct setting?

Btw my original reported issue is more the inconsistency between the code examples in our tutorial docs vs that's in our sample repos (e.g. see https://github.com/localstack-samples/localstack-terraform-samples/blob/master/s3-static-website/provider.tf) - it seems to me when we updated tutorial docs the corresponding sample repos is not updated.

Our `provider.tf` file should look like this:

```hcl showLineNumbers
Expand All @@ -180,12 +182,13 @@ provider "aws" {

# only required for non virtual hosted-style endpoint use case.
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs#s3_force_path_style
s3_use_path_style = false
s3_use_path_style = true
skip_credentials_validation = true
skip_metadata_api_check = true

endpoints {
s3 = "http://s3.localhost.localstack.cloud:4566"
s3control = "http://localhost.localstack.cloud:4566"
}
}
```
Expand Down