what’s going on here? ```deploy@274beb9a1c53:/dat...
# general
b
what’s going on here?
Copy code
deploy@274beb9a1c53:/data/pulumi/infra/aws/collector-s3$ pulumi stack rm --force MyCompany/us-east-2-prod
error: no stack named 'MyCompany/us-east-2-prod' found
deploy@274beb9a1c53:/data/pulumi/infra/aws/collector-s3$ pulumi stack rm --force us-east-2-prod
error: no stack named 'us-east-2-prod' found
deploy@274beb9a1c53:/data/pulumi/infra/aws/collector-s3$ pulumi stack init MyCompany/us-east-2-prod
error: stack 'us-east-2-prod' already exists
Copy code
deploy@274beb9a1c53:/data/pulumi/infra/aws/collector-s3$ pulumi stack ls
NAME                                LAST UPDATE     RESOURCE COUNT  URL
MyCompany/us-east-2-stage*  18 minutes ago  3               <https://app.pulumi.com/MyCompany/collector-s3/us-east-2-stage>
MyCompany/us-west-2-stage   21 minutes ago  3               <https://app.pulumi.com/MyCompany/collector-s3/us-west-2-stage>
c
There is something subtle (and to be honest kinda confusing) going on behind the scenes. A stack’s identity is comprised of three things: the organization (
MyCompany
) the project name (from
Pulumi.yaml
) and the stack name (
us-east-2-prod).
So when you are running
stacdk rm --force ...
and getting that error, Pulumi is filling in the project name from the
Pulumi.yaml
file in the current directory. I assume the
name
property in the file is “collector-s3”?
b
yes
Copy code
deploy@274beb9a1c53:/data/pulumi/infra/aws/collector-s3$ cat Pulumi.yaml 
name: collector-s3
runtime: nodejs
description: A minimal AWS TypeScript Pulumi program
c
Gotcha. I think I know what’s going on, let me take a closer look at our database.
b
those arent the “actual” names i redacted a bit
👍🏽 1
i can DM you the real deals, just didnt want to publicly
c
If you could DM me the names privately, that’d be helpful. Thanks.
b
done
b
Joining the thread, I'm the guilty party who broke things 😅
b
“the damager”
c
To close the loop here, it doesn’t look like there is any stack in your organization with project name
collector-s3
and stack name
us-east-2-prod
. So that error looks like it is “correct”. However, the error from
stack init
looks like it isn’t correct. And instead, the CLI is interpreting a 409 error code as “stack already exists” when it is actually something else. @brave-angle-33257 has the extra context there. But let me know if there is anything else that doesn’t look right.
b
Thanks, we're discussing it now 🙂