https://pulumi.com logo
Title
g

great-sunset-355

06/28/2021, 2:36 PM
I'm trying to create programmatically managed SMTP credentials https://www.pulumi.com/docs/reference/pkg/aws/iam/accesskey/#ses_smtp_password_v4_python Am I able to get the credentials without PGP? Here is my code
smtp_user = iam.User("smtp-user")
    access_key = iam.AccessKey("smtp-user-accesskey", user=smtp_user)
    pulumi.export("smtp-secret", access_key.encrypted_secret.ses_smtp_password_v4)
but it results in
AttributeError: 'NoneType' object has no attribute 'ses_smtp_password_v4'
`
b

brave-planet-10645

06/28/2021, 2:47 PM
try
pulumi.export("smtp-secret", access_key.ses_smtp_password_v4)
g

great-sunset-355

06/28/2021, 2:54 PM
Thank you @brave-planet-10645, I noticed I made a mistake 🙂 it took me a long time though. 🙂 btw since I have your attention, I've been looking at AWSX and one thing I really, really miss from CDK is the ease of creating IAM policies. With current aws provider I need to dump json like objects and once I tasted this in CDK I do not want to go back. Would you know if there is anything like that planned or is it already part of AWSX? I tried to convince colleagues that TS is leading way to write pulumi right now and this would be valuable argument
b

brave-planet-10645

06/29/2021, 8:27 AM
Can you give me an example (or link to docs) on how you create a policy in CDK?