https://pulumi.com logo
#typescript
Title
# typescript
l

late-piano-64593

03/11/2024, 5:56 PM
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

numerous-book-75463

03/11/2024, 7:01 PM
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

little-cartoon-10569

03/12/2024, 2:43 AM
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

late-piano-64593

03/12/2024, 4:45 AM
What the correct syntax to import it from the NPM packages then?
n

numerous-book-75463

03/12/2024, 12:35 PM
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

late-piano-64593

03/12/2024, 3:27 PM
Thanks! Looks like it was an error on my end in my TS configs or npm setup.