sparse-intern-71089
03/29/2023, 3:25 PMlittle-cartoon-10569
03/29/2023, 7:00 PMpulumi stack rename
can rename projects: https://www.pulumi.com/docs/reference/cli/pulumi_stack_rename/little-cartoon-10569
03/29/2023, 7:01 PMcalm-cat-43230
03/29/2023, 7:27 PMstack rename
works in that case. The (long) way we’ve done this is roughly:
• export stack to json
• change project name in yaml
• find/replace old proj name --> new proj name in json
• import stack
• update config (old values are namespaced to the old stack name still)
Unfortunately this has to be done on a stack-by-stack basis, so not fun when you have lots of envs.
Would be great to know the way to use stack rename
with just an S3 bucket. Maybe it’s just project/stack
? 🙂 I guess I could’ve tried that first…little-cartoon-10569
03/29/2023, 7:29 PMcalm-cat-43230
03/29/2023, 7:53 PMlittle-cartoon-10569
03/29/2023, 7:54 PMcalm-cat-43230
03/29/2023, 7:54 PMcalm-cat-43230
03/29/2023, 7:55 PMstack rename
doc link, fwiw. But thank you!)little-cartoon-10569
03/29/2023, 7:56 PMYou can also rename the stack’s project by passing a fully-qualified stack name as well.
calm-cat-43230
03/29/2023, 8:06 PMenough-painter-7423
04/01/2023, 8:01 AMname
field of Pulumi.yaml
(is it called a "project"?)
$ cat Pulumi.yaml
name: Infrastructure
runtime: dotnet
description: my infrastructure
V
name: NetworkInfra
runtime: dotnet
description: my network infrastructure
If I just use Vim to modify the field, that results in changing all URNs and recreating all the existing resources. I'm using an S3 backend, fwiw.
pulumi stack rename NetworkInfra/network-infra
threw this error: error: stack names are limited to 100 characters and may only contain alphanumeric, hyphens, underscores, or periods: "NetworkInfra/network-infra"
echoing-dinner-19531
04/01/2023, 9:51 AM