Skip to content

Commit

Permalink
Output the ARN of the Origin S3 Bucket (#81)
Browse files Browse the repository at this point in the history
* Output the ARN of the Origin S3 Bucket

This is useful in cases where a policy is created a CI/CD user or role,
which needs access to the Origin S3 Bucket in order to add content.

* Updated README.md

* Update outputs.tf

* Updated README.md

* Executed 'terraform fmt'

Co-authored-by: Matt Gowie <matt@masterpoint.io>
Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com>
Co-authored-by: nitro <nitrocode@users.noreply.github.com>
Co-authored-by: Erik Osterman <erik@cloudposse.com>
  • Loading branch information
5 people committed Jul 29, 2020
1 parent 97b9f6d commit 5345f1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ Available targets:
| cf\_status | Current status of the distribution |
| logs | Logs resource |
| s3\_bucket | Name of S3 bucket |
| s3\_bucket\_arn | ARN of S3 bucket |
| s3\_bucket\_domain\_name | Domain of S3 bucket |


Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@
| cf\_status | Current status of the distribution |
| logs | Logs resource |
| s3\_bucket | Name of S3 bucket |
| s3\_bucket\_arn | ARN of S3 bucket |
| s3\_bucket\_domain\_name | Domain of S3 bucket |

5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ output "s3_bucket_domain_name" {
description = "Domain of S3 bucket"
}

output "s3_bucket_arn" {
value = join("", aws_s3_bucket.origin.*.arn)
description = "ARN of S3 bucket"
}

output "logs" {
value = module.logs
description = "Logs resource"
Expand Down

0 comments on commit 5345f1f

Please sign in to comment.