ubx state provides low-level state management commands — list, show, remove, and move resources in Pulumi state.
Usage
ubx state <subcommand> [flags]
Subcommands
ubx state list
List all resources in the current stack state:
ubx state list
ubx state list --env prod
aws:s3:BucketV2 assets
aws:rds:Instance db
aws:ec2:Vpc main
aws:ec2:Subnet app-1
aws:ec2:Subnet app-2
ubx state show
Show detailed state for a specific resource:
ubx state show aws_s3_bucket_v2.assets
ubx state show unit.aws_s3_bucket_v2.assets
aws:s3:BucketV2 "assets"
id: "prod-my-assets"
bucket: "prod-my-assets"
region: "eu-west-1"
arn: "arn:aws:s3:::prod-my-assets"
ubx state rm
Remove a resource from state without destroying the cloud resource:
ubx state rm aws_s3_bucket_v2.assets
ubx state rm aws_s3_bucket_v2.assets --yes # skip confirmation
This removes the resource from Pulumi state only. The cloud resource continues to exist but is no longer managed by ubx.
ubx state mv
Move a resource to a different state key:
ubx state mv aws_s3_bucket_v2.old_name aws_s3_bucket_v2.new_name
Prefer the moved block for renames — it’s declarative and version-controlled.
All state commands accept ubx resource addresses:
unit.aws_s3_bucket_v2.assets
unit.aws_rds_instance.db
deploy.helm.backend
Or Pulumi URN format:
urn:pulumi:dev::my-platform::aws:s3/bucketV2:BucketV2::assets