github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/examples/aws-s3-cross-account-access/README.md (about) 1 # S3 bucket with cross-account access 2 3 This example describes how to create an S3 bucket in one AWS account and give access to that bucket to another user from another AWS account using bucket policy. 4 It demonstrates capabilities of provider aliases. 5 6 See [more in the S3 documentation](http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html). 7 8 ## How to run 9 10 Either `cp terraform.template.tfvars terraform.tfvars` and modify that new file accordingly or provide variables via CLI: 11 12 ``` 13 terraform apply \ 14 -var="prod_access_key=AAAAAAAAAAAAAAAAAAA" \ 15 -var="prod_secret_key=SuperSecretKeyForAccountA" \ 16 -var="test_account_id=123456789012" \ 17 -var="test_access_key=BBBBBBBBBBBBBBBBBBB" \ 18 -var="test_secret_key=SuperSecretKeyForAccountB" \ 19 -var="bucket_name=tf-bucket-in-prod" \ 20 ```