Skip to content

Resource: awsInspector2Enabler

Terraform resource for enabling AWS Inspector V2 resource scans.

\~> NOTE: Due to testing limitations, we provide this resource as best effort. If you use it or have the ability to test it, and notice problems, please consider reaching out to us on GitHub.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.inspector2Enabler.Inspector2Enabler(this, "example", {
  accountIds: ["012345678901"],
  resourceTypes: ["EC2"],
});

For the Calling Account

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsCallerIdentityCurrent =
  new aws.dataAwsCallerIdentity.DataAwsCallerIdentity(this, "current", {});
new aws.inspector2Enabler.Inspector2Enabler(this, "test", {
  accountIds: [dataAwsCallerIdentityCurrent.accountId],
  resourceTypes: ["ECR", "EC2"],
});

Argument Reference

The following arguments are required:

  • accountIds - (Required) Set of account IDs.
  • resourceTypes - (Required) Type of resources to scan. Valid values are ec2, ecr, and lambda. If you only use one type, Terraform will ignore the status of the other type.

Attributes Reference

No additional attributes are exported.

Timeouts

Configuration options:

  • create - (Default 15M)
  • update - (Default 15M)
  • delete - (Default 15M)