https://pulumi.com logo
#general
Title
# general
v

victorious-air-19043

03/18/2024, 9:46 AM
Hi all , i want to update aws iam policy through pulumi if it’s already present in aws how can i do it??? i tried using pulumi ai but didn’t work .
w

witty-battery-28013

03/18/2024, 10:27 AM
once you have written the code for aws iam policies, you can import existing policies into your stack and it will then manage that resource
v

victorious-air-19043

03/18/2024, 11:21 AM
No , my requirement is if policy already exists in aws , i want to make changes to policy document by getting the existing policy and deploy changes through pulumi
d

dry-keyboard-94795

03/18/2024, 11:57 AM
You can't do this with pulumi; however what you can do is create a new policy, then attach that policy to the roles needed either with pulumi or via the console
That way the role is made up of multiple policies; one which is managed with IaC, and one which you can directly modify
v

victorious-air-19043

03/18/2024, 12:17 PM
Thanks @dry-keyboard-94795 for your help
s

silly-fireman-6851

03/19/2024, 3:41 AM
interesting. @dry-keyboard-94795 @victorious-air-19043 boto3 provides
create_policy_version
there is no equivalent in pulumi ?