Unable to override endpoints.s3 on init

I would like to override aws backend configuration on terraform init. It used to work like this:
terraform init -backend-config="endpoint=http://127.0.0.1:9000" but the parameter is now deprecated.

Using
terraform init -backend-config="endpoints.s3=http://127.0.0.1:9000" ends up in error:

terraform init \   
  -backend-config="endpoints.s3=http://127.0.0.1:9000" \                 
  -input=false -reconfigure


Initializing the backend...
Initializing modules...
╷
│ Error: Invalid backend configuration argument
│ 
│ The backend configuration argument "endpoints.s3" given on the command line is not expected for the selected
│ backend type.
╵

I’m using this to point terraform to minio for local testing.

Is there any way how to override s3 backend?

Hi @oto-macenauer-absa,

Assuming that this endpoints argument is expecting a map of strings (which I’ve not checked), the expected syntax would be to assign that whole map, like this:

-backend-config='endpoints={s3="http://127.0.0.1:9000"}'

Thank you @apparentlymart, I’ve tested it and worked as expected!