Skip to content

Commit

Permalink
Adding Logs to S3 from the Load Balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Elhaiek committed Apr 9, 2024
1 parent 75328e2 commit 5d2b10d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
run: terraform init
working-directory: terraform

# - name: Terraform Refresh
# run: terraform refresh
# working-directory: terraform
- name: Terraform Refresh
run: terraform refresh
working-directory: terraform

- name: Terraform Plan
run: terraform plan -out=tfplan
Expand Down
4 changes: 3 additions & 1 deletion terraform/iam.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# POLICY TO LET BUCKET PERMISSIONS:


# subir como data y statement como en el infra ops en vez de esta forma:
resource "aws_s3_bucket_policy" "alb_log_bucket_policy" {
bucket = aws_s3_bucket.nlb_logs.id

Expand All @@ -11,7 +13,7 @@ resource "aws_s3_bucket_policy" "alb_log_bucket_policy" {
Principal = {
Service = "elasticloadbalancing.amazonaws.com"
},
Action = "s3:PutObject",
Action = "s3:*",
Resource = "${aws_s3_bucket.nlb_logs.arn}/*",
Condition = {
StringEquals = {
Expand Down

0 comments on commit 5d2b10d

Please sign in to comment.