-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: joaorufi <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
assets/queries/common/passwords_and_secrets/test/positive41.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
resource "aws_instance" "web_host" { | ||
# ec2 have plain text secrets in user data | ||
ami = var.ami | ||
instance_type = "t2.nano" | ||
|
||
vpc_security_group_ids = [ | ||
"${aws_security_group.web-node.id}"] | ||
subnet_id = aws_subnet.web_subnet.id | ||
user_data = <<EOF | ||
#! /bin/bash | ||
sudo apt-get update | ||
sudo apt-get install -y apache2 | ||
sudo systemctl start apache2 | ||
sudo systemctl enable apache2 | ||
export AWS_CONTEXT_CREDENTIAL=ACCAIOSFODNN7EXAMAAA | ||
export AWS_CERTIFICATE=ASCAIOSFODNN7EXAMAAA | ||
export AWS_DEFAULT_REGION=us-west-2 | ||
echo "<h1>Deployed via Terraform</h1>" | sudo tee /var/www/html/index.html | ||
EOF | ||
tags = merge({ | ||
Name = "${local.resource_prefix.value}-ec2" | ||
}, { | ||
git_last_modified_by = "[email protected]" | ||
git_modifiers = "felipe.avelar" | ||
git_org = "checkmarx" | ||
git_repo = "kics" | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters