worried-queen-62794
04/25/2024, 11:26 AMreturn new aws.iam.Policy(…)
and call that function from my program then the policy is not created. If I copy that function into my program then it is created. How could that be? I have debugged it and I can’t see any difference.worried-queen-62794
04/25/2024, 11:39 AM@pulumi/aws
from two different places. What a foot gun.worried-queen-62794
04/25/2024, 11:45 AMlittle-cartoon-10569
04/25/2024, 9:48 PMlittle-cartoon-10569
04/25/2024, 9:48 PMworried-queen-62794
04/25/2024, 9:49 PMlittle-cartoon-10569
04/25/2024, 9:50 PMprovider
or providers
opt in all constructors 🙂worried-queen-62794
04/25/2024, 9:52 PMworried-queen-62794
05/09/2024, 6:29 PMprovider
in the opts
but it fails with:
error: unknown provider 'urn:pulumi:stack::project::pulumi:providers:aws::foo::04da6b54-80e4-46f7-96ec-b56ff0331ba9' for resource 'urn:pulumi:prod::bottech-infrastructure-bootstrap::aws:iam/group:Group::Administrators'
Any idea why it would do that?little-cartoon-10569
05/09/2024, 8:36 PMworried-queen-62794
05/09/2024, 11:17 PMprovider: new aws.Provider("foo")
and then pretty much immediately calling new aws.iam.Group
. So you mean copy the aws provider code?little-cartoon-10569
05/09/2024, 11:37 PMlittle-cartoon-10569
05/09/2024, 11:38 PMworried-queen-62794
05/09/2024, 11:39 PMworried-queen-62794
05/09/2024, 11:39 PMCustomResourceOptions
that I use for all resourceslittle-cartoon-10569
05/09/2024, 11:39 PMworried-queen-62794
05/09/2024, 11:40 PMlittle-cartoon-10569
05/09/2024, 11:41 PMworried-queen-62794
05/09/2024, 11:42 PMworried-queen-62794
05/09/2024, 11:50 PMconst id = await aws.getCallerIdentity({}, { provider: new aws.Provider("foo") })
fails with:
/Users/jason/src/bottech/infrastructure/node_modules/@pulumi/pulumi/runtime/invoke.js:18
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
^
TypeError: Cannot read properties of undefined (reading 'invoke')
at /Users/jason/src/bottech/infrastructure/node_modules/@pulumi/runtime/invoke.ts:158:25
at new Promise (<anonymous>)
at /Users/jason/src/bottech/infrastructure/node_modules/@pulumi/runtime/invoke.ts:157:13
at Generator.next (<anonymous>)
at fulfilled (/Users/jason/src/bottech/infrastructure/node_modules/@pulumi/pulumi/runtime/invoke.js:18:58)
Which is not very helpful but at least that’s narrowed the problemlittle-cartoon-10569
05/10/2024, 12:22 AMlittle-cartoon-10569
05/10/2024, 12:23 AM