Skip to content

Resource: awsEc2NetworkInsightsAnalysis

Provides a Network Insights Analysis resource. Part of the "Reachability Analyzer" service in the AWS VPC console.

Example 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";
const awsEc2NetworkInsightsPathPath =
  new aws.ec2NetworkInsightsPath.Ec2NetworkInsightsPath(this, "path", {
    destination: "${aws_network_interface.destination.id}",
    protocol: "tcp",
    source: "${aws_network_interface.source.id}",
  });
new aws.ec2NetworkInsightsAnalysis.Ec2NetworkInsightsAnalysis(
  this,
  "analysis",
  {
    networkInsightsPathId: awsEc2NetworkInsightsPathPath.id,
  }
);

Argument Reference

The following arguments are required:

  • networkInsightsPathId - (Required) ID of the Network Insights Path to run an analysis on.

The following arguments are optional:

  • filterInArns - (Optional) A list of ARNs for resources the path must traverse.
  • waitForCompletion - (Optional) If enabled, the resource will wait for the Network Insights Analysis status to change to succeeded or failed. Setting this to false will skip the process. Default: true.
  • tags - (Optional) Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • alternatePathHints - Potential intermediate components of a feasible path. Described below.
  • arn - ARN of the Network Insights Analysis.
  • explanations - Explanation codes for an unreachable path. See the AWS documentation for details.
  • forwardPathComponents - The components in the path from source to destination. See the AWS documentation for details.
  • id - ID of the Network Insights Analysis.
  • pathFound - Set to true if the destination was reachable.
  • returnPathComponents - The components in the path from destination to source. See the AWS documentation for details.
  • startDate - The date/time the analysis was started.
  • status - The status of the analysis. succeeded means the analysis was completed, not that a path was found, for that see pathFound.
  • statusMessage - A message to provide more context when the status is failed.
  • tagsAll - Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
  • warningMessage - The warning message.

The alternatePathHints object supports the following:

  • componentArn - The Amazon Resource Name (ARN) of the component.
  • componentId - The ID of the component.

Import

Network Insights Analyses can be imported using the id, e.g.,

$ terraform import aws_ec2_network_insights_analysis.test nia-0462085c957f11a55