Skip to content

Instantly share code, notes, and snippets.

@PrashantBhatasana
Last active March 21, 2021 12:12
Show Gist options
  • Save PrashantBhatasana/cdf5dd2f847b89914a3782c3fdc32062 to your computer and use it in GitHub Desktop.
Save PrashantBhatasana/cdf5dd2f847b89914a3782c3fdc32062 to your computer and use it in GitHub Desktop.
This is Terraform file to create AWS inspector.
resource "aws_inspector_resource_group" "inspector_resource_group" {
tags = {
GroupName = "Production"
<Tag Name> = "<Tag Value>"
}
}
resource "aws_inspector_assessment_target" "inspector_assessment_target" {
name = "<Name of Your Assessment Target>"
resource_group_arn = aws_inspector_resource_group.inspector_resource_group.arn
}
resource "aws_inspector_assessment_template" "inspector_assessment_template" {
name = "<Name of Your Assessment Tamplate>"
target_arn = aws_inspector_assessment_target.inspector_assessment_target.arn
duration = 3600
rules_package_arns = [ // This should be change when you want to deploy this on defferent region
"arn:aws:inspector:us-east-1:316112463485:rulespackage/0-gEjTy7T7",
"arn:aws:inspector:us-east-1:316112463485:rulespackage/0-rExsr2X8",
"arn:aws:inspector:us-east-1:316112463485:rulespackage/0-PmNV0Tcd",
"arn:aws:inspector:us-east-1:316112463485:rulespackage/0-R01qwB5Q",
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment