https://pulumi.com logo
#general
Title
# general
b

brave-angle-33257

11/06/2019, 7:31 PM
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

colossal-beach-47527

11/06/2019, 7:33 PM
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

brave-angle-33257

11/06/2019, 7:36 PM
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

colossal-beach-47527

11/06/2019, 7:37 PM
Gotcha. I think I know what’s going on, let me take a closer look at our database.
b

brave-angle-33257

11/06/2019, 7:37 PM
those arent the “actual” names i redacted a bit
👍🏽 1
i can DM you the real deals, just didnt want to publicly
c

colossal-beach-47527

11/06/2019, 7:37 PM
If you could DM me the names privately, that’d be helpful. Thanks.
b

brave-angle-33257

11/06/2019, 7:38 PM
done
b

broad-boots-45639

11/06/2019, 7:53 PM
Joining the thread, I'm the guilty party who broke things 😅
b

brave-angle-33257

11/06/2019, 7:53 PM
“the damager”
c

colossal-beach-47527

11/06/2019, 8:08 PM
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

broad-boots-45639

11/06/2019, 8:09 PM
Thanks, we're discussing it now 🙂