This message was deleted.
# general
s
This message was deleted.
b
if you know the name then you can use .get to look up the User?
a
so if user is not found and created by dev stack initially, qa and prod stacks will be able to get it ?
I still want to create the user from my stack
I came up with following solutions eventually: 1. created new "shared" stack in addition to dev/qa/prod 2. Added shared resource to that stack like:
Copy code
const userName = "sharedUser";
if (pulumi.getStack() == "shared") {
        const user = new aws.iam.User(userName, { name: userName });
        return;
    }

const user = aws.iam.User.get(userName, userName);
username doesn't have to be globally unique, so I just know it statically (will take from stack config), then I don't need stack reference to grab it from output of shared stack - just do .get() like you suggested assuming that shared stack was created