elegant-oyster-42272
05/07/2024, 10:36 PMexport const userPoolExports = {
id: userPool.id,
arn: userPool.arn,
urn: userPool.urn,
groups: {
customers: {
id: customersGroup.id,
urn: customersGroup.urn,
name: customersGroup.name,
},
employees: {
id: employeesGroup.id,
urn: employeesGroup.urn,
name: employeesGroup.name,
},
},
clients: {
web: {
id: userPoolWebClient.id,
urn: userPoolWebClient.urn,
name: userPoolWebClient.name,
},
},
};
However, it doesn't seem like we can do this:
const bootstrapStackRef = new pulumi.StackReference(
`us/bootstrap/production`
);
const userPoolId = bootstrapStackRef.getOutput('userPoolExports.id');
This results in userPoolId
being undefined
Are we doing it wrong?elegant-oyster-42272
05/07/2024, 10:49 PMbootstrapStackRef.getOutput('userPoolExports').apply((userPool) => userPool.id)
elegant-oyster-42272
05/07/2024, 10:50 PMdry-keyboard-94795
05/07/2024, 10:54 PMgetOutput('userPoolExports').id
directly, without the apply.
You only need the apply if you're processing the dataelegant-oyster-42272
05/07/2024, 10:57 PMelegant-oyster-42272
05/07/2024, 10:58 PMOutput<any>
dry-keyboard-94795
05/07/2024, 11:04 PMdry-keyboard-94795
05/07/2024, 11:05 PMelegant-oyster-42272
05/07/2024, 11:05 PMelegant-oyster-42272
05/07/2024, 11:05 PMtall-energy-85878
05/08/2024, 3:05 PMgetOutput('foo') as pulumi.Output<typeof 'foo'>
elegant-oyster-42272
05/08/2024, 9:26 PMdry-keyboard-94795
05/08/2024, 9:27 PM