Skip to content

Commit

Permalink
removed aws access token
Browse files Browse the repository at this point in the history
  • Loading branch information
zablon-oigo committed Sep 24, 2024
1 parent 101d986 commit 1cdc368
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:

- name: Terraform Init,Plan and Apply
run: |
terraform refresh
terraform init
terraform plan
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
TF_TOKEN_app_terraform_io: ${{ secrets.TERRAFORM_TOKEN }}
2 changes: 1 addition & 1 deletion iam/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_iam_role_policy" "vpc_flow_log_policy" {
{
Effect = "Allow"
Action = "s3:PutObject"
Resource = "${var.bucket_name.arn}/*"
Resource = "arn:aws:s3:::${var.bucket_name}/*"
}
]
})
Expand Down
4 changes: 2 additions & 2 deletions logs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ resource "aws_flow_log" "vpc_flow_log" {
vpc_id = var.vpc_id
traffic_type = "ALL"
log_destination_type = "s3"
log_destination = var.bucket_name.arn
iam_role_arn = var.iam_role.arn
log_destination = "arn:aws:s3:::${var.bucket_name}"
iam_role_arn = var.iam_role
}
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ provider "aws" {
region = "${var.region}"
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
token = "${var.token}"
}

module "test-vpc" {
Expand Down
1 change: 0 additions & 1 deletion terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
access_key = ""
secret_key = ""
token = ""
region = ""
3 changes: 0 additions & 3 deletions var.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ variable "region" {
variable "secret_key" {
description = "Secret key"

}
variable "token" {
description = "token"
}

0 comments on commit 1cdc368

Please sign in to comment.