Traffic Mirror Target
Provides a Traffic mirror target. Read limits and considerations for traffic mirroring
Example Usage
To create a basic traffic mirror session
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.TrafficMirrorTarget;
import com.pulumi.aws.ec2.TrafficMirrorTargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var nlb = new TrafficMirrorTarget("nlb", TrafficMirrorTargetArgs.builder()
.description("NLB target")
.networkLoadBalancerArn(aws_lb.lb().arn())
.build());
var eni = new TrafficMirrorTarget("eni", TrafficMirrorTargetArgs.builder()
.description("ENI target")
.networkInterfaceId(aws_instance.test().primary_network_interface_id())
.build());
var gwlb = new TrafficMirrorTarget("gwlb", TrafficMirrorTargetArgs.builder()
.description("GWLB target")
.gatewayLoadBalancerEndpointId(aws_vpc_endpoint.example().id())
.build());
}
}
Import
Traffic mirror targets can be imported using the id
, e.g.,
$ pulumi import aws:ec2/trafficMirrorTarget:TrafficMirrorTarget target tmt-0c13a005422b86606
Properties
A description of the traffic mirror session.
The VPC Endpoint Id of the Gateway Load Balancer that is associated with the target.
The network interface ID that is associated with the target.
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
Key-value map of resource tags. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. NOTE: Either network_interface_id
or network_load_balancer_arn
should be specified and both should not be specified together