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

Native support for DigitalOcean Spaces as a Backend #25108

Closed
jaredready opened this issue Jun 2, 2020 · 4 comments
Closed

Native support for DigitalOcean Spaces as a Backend #25108

jaredready opened this issue Jun 2, 2020 · 4 comments

Comments

@jaredready
Copy link

Current Terraform Version

0.12.26

Use-cases

The current s3 backend technically works due to DigitalOcean Spaces having a S3-compatible API, but it's currently not very obvious how to use it outside of AWS S3. The API for the s3 backend is also built for AWS S3 specifically, which leads to some awkwardness when using it for other S3-compatible services.

I'd like to see a more native provider that provides an API specific to DigitalOcean Spaces that's much more obvious to use.

Proposal

Since the s3 backend technically works, I think piggy backing on most of it would be easiest, just providing a different API that's more specific Spaces.

I'm thinking the API will look something like the following:

terraform {
  backend "spaces" {
    space = "myspace"
    key    = "path/to/my/key"
    region = "nyc1"
    access_key = "acc_key"
    secret_key = "sec_key"
  }
}

Instead of the current API to make s3 work with Spaces:

terraform {
  required_version = ">= 0.11, < 0.12"
  backend "s3" {
    skip_requesting_account_id = true
    skip_credentials_validation = true
    skip_get_ec2_platforms = true
    skip_metadata_api_check = true
    access_key = "XXXXXXXXX"
    secret_key = "XXXXXXXXXXXXXXXXXXXXXXXXX"
    endpoint = "https://xxx.digitaloceanspaces.com"
    region = "us-east-1"
    bucket = "XXXXXXX" // name of your space
    key = "production/terraform.tfstate"
  }
}

References

#15553

@jaredready
Copy link
Author

If you guys agree that this would be useful, I'd like to tackle getting this implemented.

@danieldreier
Copy link
Contributor

@jaredready we are currently not adding new state backends. I wrote some pretty detailed explanations of why on several recent PRs that we closed #24647 #23481 #22799 if you want to learn more about why. I'm going to close this, because we will not be accepting new state backends until we have a plugin system, and at that point you will no longer need to file an issue with us to create a new backend.

@jaredready
Copy link
Author

jaredready commented Jun 2, 2020 via email

@ghost
Copy link

ghost commented Jul 3, 2020

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.

@ghost ghost locked and limited conversation to collaborators Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants