Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform >= 1.6.0 endpoints.s3 problem #3169

Open
ex12is opened this issue May 29, 2024 · 0 comments
Open

Terraform >= 1.6.0 endpoints.s3 problem #3169

ex12is opened this issue May 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ex12is
Copy link

ex12is commented May 29, 2024

Hi

I have a problem with migration from terragrunt 0.55.21 + terraform 1.5.6 to terragrunt 0.55.21 + terraform 1.6.6.
We have a non-amazon remote state bucket so we need to specify it via "endpoint" variable.

Before tf version 1.6.0 we can set it like this:

remote_state {
  backend = "s3"
  config = {
    endpoint   = https://storage.somecloud.net"
    bucket     = some_bucket
    region     = "some_region"
    key        = "some_key"
    encrypt    = true
    kms_key_id = "some_kms_key"

    skip_region_validation      = true
    skip_credentials_validation = true
  }
}

For tf version >=1.6.0 we need to specify a map for "endpoints" (endpoint - (Optional, Deprecated) Custom endpoint URL for the AWS S3 API. Use endpoints.s3 instead.)

remote_state {
  backend = "s3"
  config = {
    endpoints  = {
      s3 = "https://storage.somecloud.net"
      }
    bucket     = some_bucket
    region     = "some_region"
    key        = "some_key"
    encrypt    = true
    kms_key_id = "some_kms_key"

    skip_region_validation      = true
    skip_credentials_validation = true
    skip_requesting_account_id  = true
    skip_s3_checksum            = true
  }
}

When i try to use the last example terragrunt ignoring endpoints map. I have checked tg docs, it doesn't support endpoints map

So when i use "endpoint" variable i see the terraform error:

Initializing the backend...
╷
│ Warning: Deprecated Parameter
│
│   on state.tf line 6, in terraform:
│    6:     endpoint                    = "https://storage.somecloud.net"
│
│ The parameter "endpoint" is deprecated. Use parameter "endpoints.s3"
│ instead.
╵

When i use map "endpoints" terragrunt ignoring it and trying to connect to amazonaws.com - "https://some_bucket.s3.some_region.amazonaws.com/?versioning="

@ex12is ex12is added the bug Something isn't working label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant