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

Create main.tf #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
45 changes: 45 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
resource "null_resource" "null" {
}

resource "aws_ebs_volume" "web_host_storage" {
# unencrypted volume
availability_zone = "${var.region}a"
#encrypted = false # Setting this causes the volume to be recreated on apply
size = 1
tags = merge({
Name = "${local.resource_prefix.value}-ebs"
}, {
git_commit = "6e62522d2ab8f63740e53752b84a6e99cd65696a"
git_file = "terraform/aws/ec2.tf"
git_last_modified_at = "2021-05-02 11:16:31"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "bridgecrewio"
git_repo = "terragoat"
yor_trace = "c5509daf-10f0-46af-9e03-41989212521d"
})
}

resource "aws_s3_bucket" "this" {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type: S3 Bucket Sse Disabled

Description: If algorithm is AES256 then the master key is null, empty or undefined, otherwise the master key is required

Learn more about this issue


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_finding Ignore this specific single instance of finding
  • #jit_ignore_type_this_repo Ignore any finding of this type in this repo
  • #jit_undo_ignore Undo ignore command

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#jit_ignore_finding

bucket = var.bucket_name
acl = "public"

versioning {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type: S3 Bucket Without Enabled Mfa Delete

Description: S3 bucket without MFA Delete Enabled. MFA delete cannot be enabled through Terraform, it can be done by adding a MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html) and enabling versioning and MFA delete by using AWS CLI: 'aws s3api put-bucket-versioning --versioning-configuration=Status=Enabled,MFADelete=Enabled --bucket=<BUCKET_NAME> --mfa=<MFA_SERIAL_NUMBER>'

Learn more about this issue


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_finding Ignore this specific single instance of finding
  • #jit_ignore_type_this_repo Ignore any finding of this type in this repo
  • #jit_undo_ignore Undo ignore command

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#jit_ignore_finding

enabled = true
}

lifecycle {
prevent_destroy = true
}
}

resource "aws_dynamodb_table" "this" {
name = var.table_name
hash_key = "LockID"
billing_mode = "PAY_PER_REQUEST"

attribute {
name = "LockID"
type = "S"
}
}