Skip to content

error when uses endpoints.s3 #4094

Open
@Scarbous

Description

@Scarbous

Describe the bug

I want to use a custom s3 endpoint endpoints.s3.
It should work since v0.69.12

When I'm right the backend-config should something like:
-backend-config='endpoints={s3="https://s3-nbg1.foo.bar"}'

  ╷
  │ Error: Missing close bracket on index
  │ 
  │   on -backend-config="endpoints=map[s3:https://s3-nbg1.foo.bar]" line 1:
  │   (source code not available)
  │ 
  │ The index operator must end with a closing bracket ("]").
  ╵

Steps To Reproduce

When I run terragrunt init I get the described error.

include "root" {
  path = find_in_parent_folders("root.hcl")
}

remote_state {
  backend = "s3"
  config = {
    endpoints = {
      s3 = "https://s3-nbg1.foo.bar"
    }
    key                                = "${path_relative_to_include()}/tofu.tfstate"
    bucket                             = get_env("STATE_BUCKET")
    region                             = get_env("AWS_REGION")
    skip_bucket_ssencryption           = false
    encrypt                            = false
    skip_credentials_validation        = true
    skip_metadata_api_check            = true
    skip_bucket_public_access_blocking = true
    skip_bucket_ssencryption           = true
    skip_bucket_root_access            = true
    skip_bucket_enforced_tls           = true
    skip_region_validation             = true
    #use_path_style                    = true
    force_path_style                   = true
  }
}

generate "backend" {
  path      = "backend.tf"
  if_exists = "overwrite"
  contents  = <<EOF
terraform {
  backend "s3" {
  }
}
EOF
}

Expected behavior

It uses my custom s3 endpoint

Nice to haves

  • Terminal output
  • Screenshots

Versions

  • Terragrunt version: v0.76.6
  • OpenTofu/Terraform version: Terraform v1.11.2
  • Environment details (Ubuntu 20.04, Windows 10, etc.): alpine
  • Docker image: alpine/terragrunt:1.11.2

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions