Skip to content

Commit

Permalink
fix: 馃悰 resolve getPolicyDocumentOutput nil dereference
Browse files Browse the repository at this point in the history
resolves pulumi#1872
  • Loading branch information
ghostsquad committed Mar 22, 2022
1 parent 14c1188 commit 05c4826
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/go/aws/iam/getPolicyDocument.go
Expand Up @@ -138,6 +138,12 @@ func GetPolicyDocumentOutput(ctx *pulumi.Context, args GetPolicyDocumentOutputAr
ApplyT(func(v interface{}) (GetPolicyDocumentResult, error) {
args := v.(GetPolicyDocumentArgs)
r, err := GetPolicyDocument(ctx, &args, opts...)
if err != nil {
return nil, err
}
if r == nil {
return nil, fmt.Errorf("expected either result or error to be nil, not both")
}
return *r, err
}).(GetPolicyDocumentResultOutput)
}
Expand Down

0 comments on commit 05c4826

Please sign in to comment.