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

S3 backend configuration does not react the same way whether endpoint or endpoints.s3 is specified #36075

Open
Warkdev opened this issue Nov 21, 2024 · 1 comment
Labels
backend/s3 bug new new issue not yet triaged

Comments

@Warkdev
Copy link

Warkdev commented Nov 21, 2024

Terraform Version

Terraform v1.9.6
on darwin_amd64

Terraform Configuration Files

terraform {
  backend "s3" {
    region                      = "eu-fr2"
    skip_region_validation      = true
    skip_credentials_validation = true
    skip_metadata_api_check     = true
    skip_requesting_account_id  = true
    bucket = "my-bucket-12345"
    endpoints = {
      s3 = "https://{s3_suffix}.{region}.{dnsSuffix}:{custom_port}"
    }
  }
}

Debug Output

N/A

Expected Behavior

Given the configuration above, I'm expecting the terraform init command to try connecting to the S3 endpoint mentioned in the configuration.

Actual Behavior

This is not the case, it is trying to contact an endpoint with the suffix amazonaws.com instead of the configured suffix.

Error refreshing state: RequestError: send request failed
caused by: Get "https://{s3_suffix}.{region}.amazonaws.com/<key_path_to_tf_state>": dial tcp: lookup {s3_suffix}.{region}.amazonaws.com on : no such host

Please note that using the deprecated attribute endpoint works like a charm. Therefore, I'm suspecting that endpoints.s3 is not handled in the same way.

Steps to Reproduce

terraform init with valid access/secret keys

Additional Context

No response

References

No response

@Warkdev Warkdev added bug new new issue not yet triaged labels Nov 21, 2024
@bschaatsbergen
Copy link
Member

Hey @Warkdev,

Thank you for reporting this! The S3 backend is managed by the AWS Provider team at HashiCorp, and this issue has been added to their triage queue. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/s3 bug new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants