digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.24k stars 385 forks source link

Ability to interact with Spaces #258

Open lfarnell opened 6 years ago

lfarnell commented 6 years ago

I know the decision in https://github.com/digitalocean/godo/issues/150 was that the Spaces API would not be included due to the sheer number of tools/libraries that interact with the S3/S3 compatible API's already. With that being said, will Spaces operations be include in doctl? An S3 compatible API could be vendored for interacting with the API. I believe this would be beneficial and provide a complete user experience when using the tool and not force a user to use separate tools in order to interact with the service. Anyone else have thoughts on this?

Smashmint commented 6 years ago

+1 for as a requested feature.

sunny-b commented 5 years ago

Hey @lfarnell I'm an engineer on the Spaces team and I've been pushing for this as well. Though I can't make any promises. Just wanted to make an update.

cerw commented 5 years ago

Any update?

pfaffman commented 5 years ago

When trying to delete a Spaces bucket that's too big, you get

Cannot Destroy Space
When using the control panel, there is currently a limitation on how many files a Space can contain when being destroyed. To successfully delete this Space:

1. Use the file manager (or CLI tool) to manually delete all of the files in the Space.

2. Destroy the Space using the CLI tool.

But I can't find a way to do anything with spaces with the CLI tool?

@sunny-b is there news on this now?

sunny-b commented 5 years ago

@pfaffman The CLI tool they're referring to is s3cmd or aws s3. Since our current Spaces API is S3 compatible, you can use s3 cli tools to interact with Spaces. Not ideal, I know, but it's something

Here's a tutorial for reference: https://www.digitalocean.com/docs/spaces/resources/s3cmd/

pfaffman commented 5 years ago

Thanks, @sunny-b! I figured it out. It's totally obvious (except when it wasn't). Perhaps having this here will help the next hapless person who's trying to figure this out.

I failed to delete the Spaces bucket I was trying to delete with the tool, but that's another issue.

Pagebakers commented 4 years ago

Any plans to add the ability to configure CDN SSL for spaces with the cli?

andrewsomething commented 4 years ago

@Pagebakers doctl supports configuring Spaces CDNs. It's a bit unintuitive, but you can find those commands under doctl compute cdn

To add a CDN in front of a Space, run:

doctl compute cdn create foo.sfo2.digitaloceanspaces.com

To use a custom domain, you also need to pass the ID of a certificate for the domain:

doctl compute cdn create foo.sfo2.digitaloceanspaces.com \
  --certificate-id a112e5bd-5df6-44bc-a6dc-361ac7df730f \
  --domain foo.example.com

See https://www.digitalocean.com/docs/apis-clis/doctl/reference/compute/cdn/

Pagebakers commented 4 years ago

Ah I took a look at compute, but didn't see CDN.

It deserves it's own 'spaces' option, but this will do! thanks a bunch.

yordis commented 2 years ago

Hey peeps, any opportunity to support Spaces directly? We are trying to automate a replicable infrastructure on top of DO, and the first step for us is to automate the Spaces for Terraform State files (not CDN)

ryanovas commented 5 months ago

Would also like to see this as it would make CI/CD massively easier. The recommended s3cmd workaround is fine if you're in an interactive environment, but not in CI/CD. It just makes everything more complicated than if I could just upload something from the alpine/doctl image