This message was deleted.
# getting-started
s
This message was deleted.
b
hey @cool-wall-66940! welcome! as per the docs, you need additional credentials to create a space bucket: https://www.pulumi.com/registry/packages/digitalocean/api-docs/spacesbucket/ You'll need to create a spaces access key from here: https://cloud.digitalocean.com/account/api/tokens Then set it in your provider like so:
Copy code
pulumi config set spaces_access_id <my access_id>
pulumi config set spaces_secret_key <my_secret_key> --secret
c
Hey @billowy-army-68599, thanks a lot for your warm welcoming and fast response. I tried to set spaces access keys with the following two variables:
Copy code
SPACES_ACCESS_KEY_ID SPACES_SECRET_ACCESS_KEY
then I tried with
Copy code
spaces_access_id
spaces_secret_key
I copied the two values starting with M and T, was I copying the wrong tokens? I tried with the commands above you wrote but I get the same error:
Copy code
Error creating bucket: Spaces credentials not configured
b
give me a few minutes, I'll try repro
1
l
Hello @cool-wall-66940, how did you set
spaces_access_id
and
spaces_secret_key
? These keys should prefixed with the
digitalocean
namespace:
Copy code
$ pulumi config set digitalocean:spaces_access_id <YOUR_ACCESS_KEY_HERE>
$ pulumi config set digitalocean:spaces_secret_key <YOUR_SECRET_KEY_HERE> --secret
1
c
Just as @billowy-army-68599 told me: I will try with your example as well @limited-rainbow-51650, btw. thanks a lot for your reply
b
yep, @limited-rainbow-51650 is right, I forgot to add the key prefix. your
Pulumi.dev.yaml
should look like this:
Copy code
config:
  digitalocean:spaces_access_id: FQFYFUXOEWEF7GYVUPPB
  digitalocean:spaces_secret_key:
    secure: AAABACcw7Bh1kmEVZwedBFXJkqudxX7PaHorF7FHDz3J76MFkA3D1N/pgRQKWfHlSQFUvN7LcJKJE7edpT7nJcUF2TdfrUIvE6ZT
which results in:
Copy code
Updating (dev)

View Live: <https://app.pulumi.com/jaxxstorm/spaces/dev/updates/1>

     Type                                Name        Status
 +   pulumi:pulumi:Stack                 spaces-dev  created
 +   └─ digitalocean:index:SpacesBucket  example     created

Resources:
    + 2 created

Duration: 33s
c
Hey @billowy-army-68599 and @limited-rainbow-51650, this did the trick, adding the namespace:
Copy code
digitalocean
in front of the variable names. This did the trick and it created the space. Let me try to do it with
Copy code
digitalocean:SPACES_ACCESS_KEY_ID
b
that won't work for the env vars
@cool-wall-66940 I've confirmed the env vars aren't working, that must be a bug in the provider
c
Ohh, ok, thanks a lot to both of you, for your help and for resolving this issue for me.
I hope our discussion will help somebody and the bug will be resolved. Thanks once again @billowy-army-68599 and @limited-rainbow-51650
b
l
@billowy-army-68599 it might also help other people if the section on
Configuring Credentials
is extended with Spaces specific settings https://www.pulumi.com/registry/packages/digitalocean/installation-configuration/#configuring-credentials
👍 1
b
agrred
👍 1
@cool-wall-66940 I just had it pointed out to me by @broad-dog-22463 that I had misspelled my env var, if I spell them correctly, it works as expected:
Copy code
export SPACES_ACCESS_KEY_ID=<key>
export SPACES_SECRET_ACCESS_KEY=<key>
👍 1
c
So let me try it, I will delete the two vars set earlier
Thanks. Just to confirm this works:
Copy code
export SPACES_ACCESS_KEY_ID=<key>
export SPACES_SECRET_ACCESS_KEY=<key>
this didn't work what I tried, and which was obviously wrong:
Copy code
pulumi config set SPACES_ACCESS_KEY_ID <key>
pulumi config set SPACES_SECRET_ACCESS_KEY <key>
❤️ 1
b
if anyone would be up for opening a pr for improving the credentials section, we would super appreciate it! https://github.com/pulumi/registry/edit/master/themes/default/content/registry/packages/digitalocean/installation-configuration.md