hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.32k stars 9.49k forks source link

Issues in connecting to 3rd party (Cloudian) S3 bucket after version 1.5.7. #34462

Open cbotha opened 8 months ago

cbotha commented 8 months ago

Terraform Version

Terraform v1.6.6
on linux_amd64

Terraform Configuration Files

terraform {
  required_providers {
    nsxt = {
      source = "vmware/nsxt"
      version = "3.3.0"
    }
  }
  backend "s3" {
    endpoint                                  = "https://myendpoint.com"
    region                                      = "us-west-1" #this gets ignored but still needs to confirm to the AWS standard
    skip_credentials_validation   = true
    skip_metadata_api_check     = true
    bucket                      = "...."
    key                         = "...."
    skip_requesting_account_id = true
  }
}

Debug Output

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- Reusing previous version of vmware/nsxt from the dependency lock file
- Installing vmware/nsxt v3.3.0...
- Installed vmware/nsxt v3.3.0 (signed by a HashiCorp partner, key ID 6B6B0F38607A2264)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Expected Behavior

Successful init, (this works) No changes should be required following a terraform plan

Actual Behavior

I did try what was suggested in https://github.com/hashicorp/terraform/issues/33983. Pretty much adding "skip_requesting_account_id = true" to my backend configuration.

This does now allow me to successfully init. However when I perform a terraform plan it does not interpret the state correctly / at all. It wants to redeploy the entire environment.

Plan: 103 to add, 0 to change, 0 to destroy.

If I downgrade to 1.5.7, do a terraform init and the a plan it recognises the state correctly.

Steps to Reproduce

terraform init terraform plan

Additional Context

No response

References

crw commented 8 months ago

Thanks for filing this issue!

cbotha commented 1 week ago

Hi, I just reviewed the issue by using terraform v1.9.5. It is however still present. Any update as to when this will be addressed?