A CLI tool for managing Pulumi stacks across backends, supporting migrations between Pulumi Cloud and Amazon S3, project initialization, and secrets management.
- Migration: Transfer Pulumi stacks between Pulumi Cloud and S3 backends in either direction.
- Initialization: Set up new projects with S3 backend, KMS encryption, and bucket provisioning.
- Auto Login: Log into S3 backends with interactive bucket/region selection via
s3Login. - Self-Update: Keep the tool current via Git.
- S3: Bucket creation with versioning, encryption, and lifecycle policies.
- KMS: Encryption key and alias management for secrets.
- Secrets: Support for AWS KMS, passphrase, service (Pulumi Cloud), and default providers.
- Interactive prompts with smart defaults derived from project context.
- Spinner-based progress indicators and structured logging.
- Built-in migration verification via
pulumi preview.
curl -fsSL https://raw.githubusercontent.com/jiraguha/pulumi-backend/main/install.sh | bash# Install a specific tag
curl -fsSL https://raw.githubusercontent.com/jiraguha/pulumi-backend/main/install.sh | bash -s -- --tag v1.0.0
# Install a specific branch
curl -fsSL https://raw.githubusercontent.com/jiraguha/pulumi-backend/main/install.sh | bash -s -- --branch dev
# Install to a different directory
curl -fsSL https://raw.githubusercontent.com/jiraguha/pulumi-backend/main/install.sh | bash -s -- --dir ~/.local/binpulumi-backend cloudToS3 --stack=mystack --bucket=my-pulumi-state --region=us-west-2pulumi-backend s3ToCloud --stack=mystack --organization=my-org --backend=s3://my-pulumi-state?region=us-west-2pulumi-backend init --name=my-project --bucket=my-pulumi-statepulumi-backend s3Loginpulumi-backend self-updatepulumi-backend <command> --helppulumi-backend cloudToS3 \
--stack=mystack \
--bucket=my-pulumi-state \
--secrets-provider=awskms \
--kms-alias=alias/pulumi-secretspulumi-backend s3ToCloud \
--stack=mystack \
--backend=s3://my-pulumi-state?region=us-west-2 \
--organization=my-orgpulumi-backend init \
--name=my-project \
--bucket=my-pulumi-state \
--region=us-west-2 \
--secrets-provider=awskms \
--no-interactive --yespulumi-backend init- Deno runtime
- Pulumi CLI
- AWS CLI configured with appropriate permissions
- Git for installation and updates
pulumi-backend/
├── mod.ts # Entry point (shebang)
├── pulumi-backend.sh # Shell wrapper (symlink target)
├── deno.json # Import map and tasks
├── src/
│ ├── cli.ts # Command routing and help
│ ├── version.ts # Version constant
│ ├── types.ts # Shared interfaces
│ ├── ui/
│ │ ├── logger.ts # Logger class with spinners
│ │ ├── symbols.ts # UI symbols
│ │ ├── banner.ts # CLI banner
│ │ └── colors.ts # Color re-exports
│ ├── exec/
│ │ └── command.ts # Command execution (Deno.Command)
│ ├── checks/
│ │ └── prerequisites.ts # Pulumi/AWS prerequisite checks
│ ├── aws/
│ │ ├── s3.ts # S3 bucket operations
│ │ ├── kms.ts # KMS key management
│ │ └── identity.ts # AWS identity
│ ├── pulumi/
│ │ ├── backend.ts # Backend login (S3/Cloud)
│ │ ├── stack.ts # Stack operations
│ │ ├── secrets.ts # Secrets provider management
│ │ └── project.ts # Project init and config
│ └── commands/
│ ├── cloud-to-s3.ts # Cloud to S3 migration
│ ├── s3-to-cloud.ts # S3 to Cloud migration
│ ├── init.ts # Project initialization
│ ├── s3-login.ts # S3 auto-login
│ └── self-update.ts # Self-update
├── install.sh # Installer script
└── dummy-test-infra/ # Test infrastructure
Licensed under the MIT License.
Contributions welcome. Open issues and pull requests on GitHub.