AWS Amazon Inspector Assessment Target

This page shows how to write Terraform and CloudFormation for Amazon Inspector Assessment Target and write them securely.

aws_inspector_assessment_target (Terraform)

The Assessment Target in Amazon Inspector can be configured in Terraform with the resource name aws_inspector_assessment_target. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

inspector.tf#L8
resource "aws_inspector_assessment_target" "scheduled_inspector_target" {
  name               = "Scheduled assessment target"
  resource_group_arn = aws_inspector_resource_group.scheduled_inspector.arn
}
main.tf#L5
resource "aws_inspector_assessment_target" "myinspector" {
  name = "inspector-instance-assessment"
}

resource "aws_inspector_assessment_template" "template" {
  name       = data.aws_region.current.name

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a Inspector assessment target

AWS::Inspector::AssessmentTarget (CloudFormation)

The AssessmentTarget in Inspector can be configured in CloudFormation with the resource name AWS::Inspector::AssessmentTarget. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

serverless.yml#L83
      Type: AWS::Inspector::AssessmentTarget
      Properties:
        AssessmentTargetName : "Allinstances"
    AssessmentTemplate:
      Type: AWS::Inspector::AssessmentTemplate
      Properties:
28_Inspector.yml#L62
    Type: AWS::Inspector::AssessmentTarget
    Properties:
      AssessmentTargetName: InspectorAssessmentTarget

  InspectorTemplate:
    Type: AWS::Inspector::AssessmentTemplate
cfn-inspector-sns.yml#L26
    Type: AWS::Inspector::AssessmentTarget
    Properties:
      ResourceGroupArn: !Ref MyInspectoryResourceGroup

  MyInspectorTemplate:
    Type: AWS::Inspector::AssessmentTemplate
cfn-inspector.yml#L22
    Type: AWS::Inspector::AssessmentTarget
    Properties:
      ResourceGroupArn: !Ref MyInspectoryResourceGroup

  MyInspectorTemplate:
    Type: AWS::Inspector::AssessmentTemplate
inspector-example.yml#L13
    Type: AWS::Inspector::AssessmentTarget
    Properties:
      AssessmentTargetName: "All-Instances"


  inspectorAssessmentTemplate:
InspectorAssessmentTargetSpecification.json#L3
    "AWS::Inspector::AssessmentTarget": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-assessmenttarget.html",
      "Attributes": {
        "Arn": {
          "PrimitiveType": "String"
        }
InspectorAssessmentTargetSpecification.json#L3
    "AWS::Inspector::AssessmentTarget": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-assessmenttarget.html",
      "Attributes": {
        "Arn": {
          "PrimitiveType": "String"
        }
InspectorAssessmentTargetSpecification.json#L3
    "AWS::Inspector::AssessmentTarget": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-assessmenttarget.html",
      "Attributes": {
        "Arn": {
          "PrimitiveType": "String"
        }
InspectorAssessmentTargetSpecification.json#L3
    "AWS::Inspector::AssessmentTarget": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-assessmenttarget.html",
      "Attributes": {
        "Arn": {
          "PrimitiveType": "String"
        }
InspectorAssessmentTargetSpecification.json#L3
    "AWS::Inspector::AssessmentTarget": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-assessmenttarget.html",
      "Attributes": {
        "Arn": {
          "PrimitiveType": "String"
        }

Parameters

Explanation in CloudFormation Registry

The AWS::Inspector::AssessmentTarget resource is used to create Amazon Inspector assessment targets, which specify the Amazon EC2 instances that will be analyzed during an assessment run.

Frequently asked questions

What is AWS Amazon Inspector Assessment Target?

AWS Amazon Inspector Assessment Target is a resource for Amazon Inspector of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon Inspector Assessment Target?

For Terraform, the heldersepu/hs-scripts and snapdocs/terraform-aws-inspector source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the tkykm/sls-aws-monitoring-slack, AymanZahran/AWS_DevOps_Automation and ambasad/devio-blog-cfn source code examples are useful. See the CloudFormation Example section for further details.