title: Is there a way to append IAM Bucket Policy Statement to Existing Statements using terraform?
body: <p>I currently have a centralised S3 bucket in a central account accessed via multiple other child accounts. I would like to dynamically update the bucket policy from each of the child accounts by taking the existing IAM Bucket Policy and append a new statement allowing the IAM role from the calling account to have access to the bucket.</p>
  <p>I tried to use a combination of aws_iam_policy_document and source_json with a new statement. However, all this does is overwrite the existing statement.</p>
  <p>What I am trying to achieve is take this existing policy json and either merge or append to a new statement. Any ideas how to achieve this?</p>
  <p>Does anyone have a working example of managing cross account s3 bucket policies and dynamically updating the policy to allow access from roles within child accounts?</p>