Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
data "aws_region" "current" {}

module "vpc" {
source = "./modules/vpc"

Expand All @@ -9,7 +7,6 @@ module "vpc" {

module "user_data" {
source = "./modules/user_data"
hostname = "agentless-scanning-${data.aws_region.current.name}"
api_key = var.api_key
api_key_secret_arn = var.api_key_secret_arn
site = var.site
Expand Down
1 change: 0 additions & 1 deletion modules/user_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ No modules.
| <a name="input_agent_repo_url"></a> [agent\_repo\_url](#input\_agent\_repo\_url) | Specifies the agent distribution channel | `string` | `"datad0g.com"` | no |
| <a name="input_api_key"></a> [api\_key](#input\_api\_key) | Specifies the API key required by the Datadog Agent to submit vulnerabilities to Datadog | `string` | `null` | no |
| <a name="input_api_key_secret_arn"></a> [api\_key\_secret\_arn](#input\_api\_key\_secret\_arn) | ARN of the secret holding the Datadog API key. Takes precedence over api\_key variable | `string` | `null` | no |
| <a name="input_hostname"></a> [hostname](#input\_hostname) | Specifies the hostname the agentless-scanning agent will report as | `string` | n/a | yes |
| <a name="input_scanner_version"></a> [scanner\_version](#input\_scanner\_version) | Specifies the agentless scanner version installed | `string` | `"50.0~agentless~scanner~2024011701"` | no |
| <a name="input_site"></a> [site](#input\_site) | By default the Agent sends its data to Datadog US site. If your organization is on another site, you must update it. See https://docs.datadoghq.com/getting_started/site/ | `string` | `"datadoghq.com"` | no |

Expand Down
1 change: 0 additions & 1 deletion modules/user_data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ resource "terraform_data" "template" {
}
}
input = templatefile("${path.module}/templates/install.sh.tftpl", {
hostname = var.hostname,
api_key = var.api_key,
api_key_secret_arn = var.api_key_secret_arn
site = var.site,
Expand Down
3 changes: 0 additions & 3 deletions modules/user_data/templates/install.sh.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -u
set -e
set -o pipefail

echo "${hostname}" > /etc/hostname

%{ if api_key_secret_arn != null }
apt update
apt install awscli -y
Expand All @@ -17,7 +15,6 @@ DD_API_KEY=${api_key}
# Install the agent
DD_API_KEY=$DD_API_KEY \
DD_SITE="${site}" \
DD_HOSTNAME="${hostname}" \
DD_REPO_URL="${agent_repo_url}" \
DD_AGENT_DIST_CHANNEL="beta" \
DD_AGENT_MINOR_VERSION="${scanner_version}" \
Expand Down
5 changes: 0 additions & 5 deletions modules/user_data/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "hostname" {
description = "Specifies the hostname the agentless-scanning agent will report as"
type = string
}

variable "api_key" {
description = "Specifies the API key required by the Datadog Agent to submit vulnerabilities to Datadog"
type = string
Expand Down