Did `aws.iam.PolicyDocument` move out of the expor...
# typescript
l
Did
aws.iam.PolicyDocument
move out of the exported API? I can't seem to find it in the
aws.iam
module. version:
"@pulumi/aws": "6.22.0",
n
Do you mean
GetPolicyDocument
?
Additionally in a lot of google results generated by the AI answers such as https://www.pulumi.com/ai/answers/3JJ5rMQW92Yut9Q1MeiDJj/type-safe-json-iam-policies-in-aws
l
I'm using it in 6.22. It's in aws.iam.documents.d.ts
Confirmed that aws.iam.index.d.ts exports it. Line 10: > export * from "./documents";
l
What the correct syntax to import it from the NPM packages then?
n
You should be able do this
Copy code
import * as aws from '@pulumi/aws';
const policy: aws.iam.PolicyDocument = {}
or this
Copy code
import { PolicyDocument } from '@pulumi/aws/iam';
l
Thanks! Looks like it was an error on my end in my TS configs or npm setup.