-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Allow non-AWS S3 backends #15553
Allow non-AWS S3 backends #15553
Conversation
This commit makes sts, metadata and other AWS related API calls optional, thus the backend initialization will not send non-AWS API tokens to AWS APIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bonifaido,
Thanks for the PR!
@bonifaido Can I ask what non-AWS S3 you tested against? I believe that if your non-AWS S3 doesn't have a region that matches the regions available from AWS it will still fail. I can file an issue regarding this if that's the case. |
@lfarnell I have used IBM Cloud Object Storage https://www.ibm.com/cloud-computing/bluemix/cloud-object-storage, it works well with the following configuration: terraform {
backend "s3" {
endpoint = "http://s3.eu-geo.objectstorage.softlayer.net"
region = "us-west-1" # Basically this gets ignored.
profile = "cos-profile"
bucket = "remote-state"
key = "terraform"
skip_requesting_account_id = true
skip_credentials_validation = true
skip_get_ec2_platforms = true
skip_metadata_api_check = true
}
} This works because the endpoint decides which region are you using. To be honest I haven't tried with anything else. |
I have successfully tested this with cloudian s3 and it's now working using the above config! terraform Terraform v0.10.8-dev (1feb26f |
I have attempted to configure the same working s3 backend as a terraform provider data source but it's failing with InvalidClientTokenId. Does anybody know if the terraform-provider-terraform plugin will need to be updated to work with this type of s3 backend config? |
Is there a way to force the use of bucket (path-style) endpoints instead of virtual hosted-style? |
This indeed works (Terraform v0.10.8). But it still needs a valid aws region even on a custom non aws endpoint. |
@trodemaster I'm also trying to use cloudian S3 and unfortunately it does not work properly for me. I'm getting the same error message as you do :( I have used the following config
Using Error says
|
@RafPe instead of access key use profile = "your profile name" . just append your endpoint provider and check once again. i fixed this with AWS on below mentioned ticket. try to upgrade terraform version to 0.11.2. |
Tested and working with digitalocean spaces : this was my config
|
I encountered a 403 issue while using Wasabi as a backend. To debug, |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This commit makes sts, metadata and other AWS related API calls optional, thus the backend initialization will not send non-AWS API tokens to AWS APIs.
This fixes #12377