chore(kb/pulumi): add commands to rename projects to the tl;dr

This commit is contained in:
Michele Cereda
2024-04-10 18:21:24 +02:00
parent 65a5f5b4db
commit 7e0147ef5b

View File

@@ -190,6 +190,10 @@ pulumi stack rm --preserve-config --yes --stack 'stack'
pulumi stack graph 'path/to/graph.dot'
pulumi stack graph -s 'dev' 'dev.dot' --short-node-name
# Rename stacks.
pulumi stack rename 'new-name'
pulumi stack rename 'new-dev' -s 'dev'
# Rename resources in states.
pulumi state rename 'resourceUrn' 'newName'
@@ -206,6 +210,14 @@ pulumi state delete --force --target-dependents \
pulumi state unprotect 'resourceUrn'
# Rename projects.
# Requires the use of fully-qualified stack names.
# To update the stack again, one also needs to update the 'name' field of the projects' 'Pulumi.yaml' file to match the
# new name.
pulumi stack rename 'org/new-project/dev'
pulumi stack rename 'org/new-project/dev' -s 'dev'
# Run in Docker.
docker run … -it \
-v "$(pwd):/pulumi/projects" \
@@ -214,7 +226,6 @@ docker run … -it \
bash -c "npm ci && pulumi login 's3://bucket/prefix' && pulumi pre --parallel $(nproc) -s 'dev'"
# Plans
# *Experimental* feature at the time of writing.
# Has issues with apply operations?