salmon-scooter-43644
01/23/2025, 2:29 PMrefresh
yesterday, I started getting 401 errors on all the DO endpoints (like querying for resources in DO). I know there's something with DO and rotating tokens, so I created a new token in DO and have set that as my local DIGITALOCEAN_TOKEN
envar (and confirmed it with env | grep
), as well as set it as digitalocean:token
in esc. However, when I do a pulumi config refresh
, it's not updating my local Pulumi.prod.yaml
file with the updated hash, and I'm still getting the error. I ran pulumi env open <env>
and I see the value is updated correctly and I've confirmed that if I make the same API requests (using curl
) to DO that it's failing on with 401s and passing the new token that it does work successfully and I can see my DO resources, so it seems like the pulumi
commands aren't pulling in the new value. I did try setting the value with pulumi config set digitalocean:token <value> --secret
and that does update my Pulumi.prod.yaml
file, but it's still failing with the same errors. Wondering if anyone here has any thoughts. Thank you!stocky-restaurant-98004
01/23/2025, 2:49 PMenvironment:
key in your Pulumi IaC config file to automatically load the environment.salmon-scooter-43644
01/23/2025, 3:44 PMvalues.pulumiConfig.digitalocean:token
(among other values under pulumiConfig
which I reference using config = pulumi.Config()
then config.require_secret('someKey')
). I don't reference that token directly in my script, but up till now it's worked. I just tried to add a top-level environment
key with digitalocean:token
in it and that didn't have an effect.stocky-restaurant-98004
01/23/2025, 3:59 PMPulumi.dev.yaml
), the syntax is:
environment:
- esc_project/esc_environment
stocky-restaurant-98004
01/23/2025, 4:00 PMlatest
since you're storing an expiring token that you're gonna have to rotate manually.stocky-restaurant-98004
01/23/2025, 4:01 PMsalmon-scooter-43644
01/23/2025, 4:04 PMenvironment
set correctly. I deleted the contents of config
in that file and re-ran pulumi config refresh -f
and it populated them again, but it seems to still be using an old version. I'll try pinning it to the latest just to see if it pulls it.salmon-scooter-43644
01/23/2025, 4:06 PMstocky-restaurant-98004
01/23/2025, 4:08 PMsalmon-scooter-43644
01/23/2025, 4:10 PMpulumi config refresh -f
should pull in the latest version of the pulumiConfig
section in the ESC environment?salmon-scooter-43644
01/23/2025, 4:17 PMPulumi.prod.yaml
and adding it in plaintext in Pulumi.yaml
and that didn't work either.stocky-restaurant-98004
01/23/2025, 4:27 PMsalmon-scooter-43644
01/23/2025, 4:43 PMdigitalocean:token
to a random plaintext value to test that that's working and it wasn't updated in the stack when I load the UI. I guess I'm just a little confused overall, but that explains why setting it via the CLI wouldn't force it to use that value in the subsequent commands. Any thoughts around how to get the token to update in the pulumi config so it'll use the new value in refresh/up commands?stocky-restaurant-98004
01/23/2025, 4:49 PMstocky-restaurant-98004
01/23/2025, 4:49 PMsalmon-scooter-43644
01/23/2025, 4:56 PMpulumi config rm digitalocean:token
, then ran pulumi config get digitalocean:token
and it returned the new value. So I suppose this means it's pulling from ESC. pulumi refresh
and pulumi up --refresh
still fail with 401 errors, but I'm getting a different error when I just run pulumi up
(kubernetes 403). So I'll try and run that down and see if it's all fixed now.salmon-scooter-43644
01/23/2025, 4:57 PMred-match-15116
01/23/2025, 5:04 PMsalmon-scooter-43644
01/23/2025, 5:08 PMsalmon-scooter-43644
01/23/2025, 5:09 PM