Is there any approach of getting a stack output ba...
# general
f
Is there any approach of getting a stack output based on what stack it is?
Copy code
if (config.isProduction == false) {
    export const rdsPassword = rds.masterPassword
}
Like that wouldn’t work.
h
pulumi.getStack()
f
Yeah, I know, that’s how I get wether or not it is production. That’s not the problem
h
Oh you want to output certain things based on the stack?
f
Yeah I thought that’s what I wrote.
Sorry for the confusion.
h
Copy code
export const rdsPassword = pulumi.getStack() === "prod" ? rds.masterPassword : "notapassword"
Something like that?
f
Oh don’t I feel stupid, yeah I get that’s better.
Thank you!
h
NP