Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terragaot local #640

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions s3.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
NEW RESOURCE CHANGE 0225raaesource "aws_s3_bucket" "data" {
# bucket is public
# bucket is not encrypted
# bucket does not have access logs
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-data"
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-data"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "fc8c2d7a-1997-4fc2-95c1-277cba5c2a38"
}
versioning {
enabled = "${var.versioning_enabled}"
}
}




resource "aws_s3_bucket" "data_log_bucket" {
bucket = "data-log-bucket"
}

resource "aws_s3_bucket_logging" "data" {
bucket = aws_s3_bucket.data.id

target_bucket = aws_s3_bucket.data_log_bucket.id
target_prefix = "log/"
}


resource "aws_s3_bucket_object" "data_object" {
bucket = aws_s3_bucket.data.id
key = "customer-master.xlsx"
source = "resources/customer-master.xlsx"
tags = {
Name = "${local.resource_prefix.value}-customer-master"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "b77af90c-712d-4209-90ad-d46815ab3eb7"
}
}

resource "aws_s3_bucket" "financials" {
# bucket is not encrypted
# bucket does not have access logs
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-financials"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "cecbef60-a2ea-4710-9d45-b865340e6095"
}

}


resource "aws_s3_bucket_server_side_encryption_configuration" "financials" {
bucket = aws_s3_bucket.financials.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}


resource "aws_s3_bucket" "operations" {
# bucket is not encrypted
# bucket does not have access logs
bucket = "${local.resource_prefix.value}-operations"
acl = "private"
versioning {
enabled = true
}
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-operations"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "e62dfbc0-cc44-408b-a26a-13938d22e2f0"
}

}


resource "aws_s3_bucket_server_side_encryption_configuration" "operations" {
bucket = aws_s3_bucket.operations.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}


resource "aws_s3_bucket" "data_science" {
# bucket is not encrypted
bucket = "${local.resource_prefix.value}-data-science"
acl = "private"
versioning {
enabled = true
}
logging {
target_bucket = "${aws_s3_bucket.logs.id}"
target_prefix = "log/"
}
force_destroy = true
tags = {
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "25565a41-2c9e-45f2-a9e9-6c15b7afcfb6"
}
}

resource "aws_s3_bucket" "logs" {
bucket = "${local.resource_prefix.value}-logs"
acl = "log-delivery-write"
versioning {
enabled = true
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = "${aws_kms_key.logs_key.arn}"
}
}
}
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-logs"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "ce72f84f-4cb6-4f67-b540-54d7e998df19"
}
}
180 changes: 180 additions & 0 deletions s3b.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
NEW RESOURCE CHANGE 0225raaesource "aws_s3_bucket" "data" {
# bucket is public
# bucket is not encrypted
# bucket does not have access logs
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-data"
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-data"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "fc8c2d7a-1997-4fc2-95c1-277cba5c2a38"
}
versioning {
enabled = "${var.versioning_enabled}"
}
}




resource "aws_s3_bucket" "data_log_bucket" {
bucket = "data-log-bucket"
}

resource "aws_s3_bucket_logging" "data" {
bucket = aws_s3_bucket.data.id

target_bucket = aws_s3_bucket.data_log_bucket.id
target_prefix = "log/"
}


resource "aws_s3_bucket_object" "data_object" {
bucket = aws_s3_bucket.data.id
key = "customer-master.xlsx"
source = "resources/customer-master.xlsx"
tags = {
Name = "${local.resource_prefix.value}-customer-master"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "b77af90c-712d-4209-90ad-d46815ab3eb7"
}
}

resource "aws_s3_bucket" "financials" {
# bucket is not encrypted
# bucket does not have access logs
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-financials"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "cecbef60-a2ea-4710-9d45-b865340e6095"
}

}


resource "aws_s3_bucket_server_side_encryption_configuration" "financials" {
bucket = aws_s3_bucket.financials.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}


resource "aws_s3_bucket" "operations" {
# bucket is not encrypted
# bucket does not have access logs
bucket = "${local.resource_prefix.value}-operations"
acl = "private"
versioning {
enabled = true
}
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-operations"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "e62dfbc0-cc44-408b-a26a-13938d22e2f0"
}

}


resource "aws_s3_bucket_server_side_encryption_configuration" "operations" {
bucket = aws_s3_bucket.operations.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}


resource "aws_s3_bucket" "data_science" {
# bucket is not encrypted
bucket = "${local.resource_prefix.value}-data-science"
acl = "private"
versioning {
enabled = true
}
logging {
target_bucket = "${aws_s3_bucket.logs.id}"
target_prefix = "log/"
}
force_destroy = true
tags = {
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "25565a41-2c9e-45f2-a9e9-6c15b7afcfb6"
}
}

resource "aws_s3_bucket" "logs" {
bucket = "${local.resource_prefix.value}-logs"
acl = "log-delivery-write"
versioning {
enabled = true
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = "${aws_kms_key.logs_key.arn}"
}
}
}
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-logs"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "ce72f84f-4cb6-4f67-b540-54d7e998df19"
}
}
M-C02G37VQMD6M:terragoat cas
2 changes: 1 addition & 1 deletion terraform/aws/consts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ variable "password" {
default = "Aa1234321Bb"
}

variable "neptune-dbname" {
variable "neptundfaea
type = "string"
description = "Name of the Neptune graph database"
default = "neptunedb1"
Expand Down
2 changes: 1 addition & 1 deletion terraform/aws/es.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "aws_elasticsearch_domain" "monitoring-framework" {
a;lkdjfa;ldkresource "aws_elasticsearch_domain" "monitoring-framework" {
domain_name = "tg-${var.environment}-es"
elasticsearch_version = "2.3"

Expand Down
12 changes: 12 additions & 0 deletions terraform/aws/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ resource "aws_s3_bucket" "operations" {

}


resource "aws_s3_bucket_server_side_encryption_configuration" "operations" {
bucket = aws_s3_bucket.operations.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
}
}
}


resource "aws_s3_bucket" "data_science" {
# bucket is not encrypted
bucket = "${local.resource_prefix.value}-data-science"
Expand Down