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.
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