Skip to content

Commit

Permalink
adding Module to test if Logs for ALB work
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Elhaiek committed Apr 9, 2024
1 parent aef4543 commit b4ff8f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 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
20 changes: 0 additions & 20 deletions terraform/iam.tf
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# # POLICY TO LET BUCKET PERMISSIONS:

data "aws_elb_service_account" "main" {}

data "aws_iam_policy_document" "bucket_policy" {
statement {
actions = ["s3:PutObject"]
resources = ["${aws_s3_bucket.logging_bucket.arn}/*"]

principals {
type = "AWS"
identifiers = [data.aws_elb_service_account.main.arn]
}
}
}

resource "aws_s3_bucket_policy" "bucket_policy" {
bucket = aws_s3_bucket.nlb_logs.id
policy = data.aws_iam_policy_document.bucket_policy.json
}



# # subir como data y statement como en el infra ops en vez de esta forma:
# resource "aws_s3_bucket_policy" "alb_log_bucket_policy" {
Expand Down

0 comments on commit b4ff8f9

Please sign in to comment.