Platform/OS
Linux, macOS, Windows
Category
Infrastructure as Code
Pulumi
Pulumi is a tool that lets regular developers write simple code to create and manage their cloud servers, databases, and other resources instead of clicking around in complicated web dashboards. In everyday terms, it works like a recipe book where you write instructions in your favorite programming language and it automatically builds and updates everything you need in the cloud. It stores the current picture of all your cloud resources as simple files in S3-compatible object storage so it always knows exactly what exists and what needs to change. Every time you update your code, Pulumi compares the new plan against the previous snapshot saved in S3 to figure out only the necessary changes, making updates fast and safe. This clever use of everyday S3 storage means teams can safely collaborate, roll back mistakes easily, and track their entire cloud setup over time without needing expensive extra databases. Pulumi lets software developers build and manage massive cloud systems just by writing code, it supports S3-compatible backends for state management, snapshots, and secure multi-user collaboration.
Connection / Setup
- Create an account and log in to DiskSpace
- Click I'm ready to set up my storage
- Enter Bucket Name following the instructions
- Click Create Bucket and wait for it to be generated
- Find your Endpoint URL, Access Key, and Secret Key in the S3 Client Configuration section for use below
Connecting Pulumi to DiskSpace.sh (S3-compatible storage)
Follow these steps to configure Pulumi to use DiskSpace.sh as a custom S3 backend. DiskSpace.sh is fully S3 API compatible and requires path-style addressing.
Connection Steps:
- Install the Pulumi CLI if you haven't already.
- Set the following environment variables in your terminal:
Export these variables before running Pulumi commands:
export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
export AWS_ENDPOINT_URL=https://s3.diskspace.sh
export AWS_S3_FORCE_PATH_STYLE=true
export AWS_REGION=us-east-1
Path Style Requirement
DiskSpace.sh requires path-style requests (not virtual-hosted style). The correct format is:
https://s3.diskspace.sh/bucket-name/key
Example Pulumi Backend Configuration
pulumi login s3://my-bucket
# Or when creating a new stack:
pulumi stack init --stack org/project/dev \
--backend-url s3://my-bucket
Note: The region can be left empty or set to
us-east-1. Pulumi will automatically use path-style requests when the AWS_S3_FORCE_PATH_STYLE environment variable is set to true.
Troubleshooting
- • Ensure you are using the exact endpoint URL:
https://s3.diskspace.sh - • Always set
AWS_S3_FORCE_PATH_STYLE=trueto prevent virtual-hosted style errors - • If you receive signature errors, verify your Access Key ID and Secret Access Key
- • Use
us-east-1as the region if you encounter region-related issues - • Test connectivity first using the AWS CLI with the
--endpoint-urlflag