https://pulumi.com logo
Title
b

brief-baker-41837

08/24/2022, 5:22 AM
Is there a way to append s3 bucket policies to pre existing ones?
f

fancy-spoon-7206

08/24/2022, 5:30 AM
My basic understanding - If the policy was created and controlled using Pulumi, it will be an update to the same resource. If the policy is not created using Pulumi, you would have to import it into the state first and then fiddle.
b

brief-baker-41837

08/24/2022, 2:37 PM
I follow that but doesn't that mean I will have to import the policy doc and manually make adjustments to include the new statement(s) in it? I was wondering if there's a way pulumi appends new statement(s) automatically and not overwrite it when making an update.
f

fancy-spoon-7206

08/24/2022, 4:05 PM
You cannot append/update anything that is not in the state file. I don't understand
manually make adjustments
- if the policy is already in the state file, that ,means you have it somewhere in code.
b

brief-baker-41837

08/24/2022, 4:22 PM
I meant if i import the policies, then i have to 1. Include it in code 2. Add the new statements
f

fancy-spoon-7206

08/24/2022, 4:25 PM
Yes.