mirror of
https://github.com/Smaug123/PulumiConfig
synced 2025-10-05 16:48:39 +00:00
22 lines
563 B
Bash
Executable File
22 lines
563 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd PulumiWebServer || exit 1
|
|
|
|
exit_code=0
|
|
|
|
if [ -z "$DIGITAL_OCEAN_TOKEN" ]; then
|
|
echo "Get a Digital Ocean personal access token and pass it in as the env var DIGITAL_OCEAN_TOKEN."
|
|
exit_code=1
|
|
else
|
|
pulumi config set digitalocean:token "$DIGITAL_OCEAN_TOKEN" --secret
|
|
fi
|
|
|
|
if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
|
|
echo "Get a Cloudflare API token with edit-DNS rights, and pass it in as the env var CLOUDFLARE_API_TOKEN."
|
|
exit_code=1
|
|
else
|
|
pulumi config set cloudflare:apiToken "$CLOUDFLARE_API_TOKEN" --secret
|
|
fi
|
|
|
|
exit $exit_code
|