doctl icon indicating copy to clipboard operation
doctl copied to clipboard

Ability to interact with Spaces

Open lfarnell opened this issue 7 years ago • 11 comments

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?

lfarnell avatar Oct 05 '17 17:10 lfarnell

+1 for as a requested feature.

Smashmint avatar Feb 08 '18 08:02 Smashmint

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.

sunny-b avatar Oct 30 '18 14:10 sunny-b

Any update?

cerw avatar Apr 15 '19 03:04 cerw

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?

pfaffman avatar Jul 09 '19 19:07 pfaffman

@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/

sunny-b avatar Jul 17 '19 14:07 sunny-b

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.

pfaffman avatar Jul 17 '19 18:07 pfaffman

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

Pagebakers avatar Jul 08 '20 07:07 Pagebakers

@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/

andrewsomething avatar Jul 08 '20 14:07 andrewsomething

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.

Pagebakers avatar Jul 08 '20 14:07 Pagebakers

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)

yordis avatar Jul 11 '22 07:07 yordis