TrafficMirrorTarget

Provides an Traffic mirror target.
Read limits and considerations for traffic mirroring

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var nlb = new Aws.Ec2.TrafficMirrorTarget("nlb", new Aws.Ec2.TrafficMirrorTargetArgs
        {
            Description = "NLB target",
            NetworkLoadBalancerArn = aws_lb.Lb.Arn,
        });
        var eni = new Aws.Ec2.TrafficMirrorTarget("eni", new Aws.Ec2.TrafficMirrorTargetArgs
        {
            Description = "ENI target",
            NetworkInterfaceId = aws_instance.Test.Primary_network_interface_id,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewTrafficMirrorTarget(ctx, "nlb", &ec2.TrafficMirrorTargetArgs{
			Description:            pulumi.String("NLB target"),
			NetworkLoadBalancerArn: pulumi.Any(aws_lb.Lb.Arn),
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewTrafficMirrorTarget(ctx, "eni", &ec2.TrafficMirrorTargetArgs{
			Description:        pulumi.String("ENI target"),
			NetworkInterfaceId: pulumi.Any(aws_instance.Test.Primary_network_interface_id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

nlb = aws.ec2.TrafficMirrorTarget("nlb",
    description="NLB target",
    network_load_balancer_arn=aws_lb["lb"]["arn"])
eni = aws.ec2.TrafficMirrorTarget("eni",
    description="ENI target",
    network_interface_id=aws_instance["test"]["primary_network_interface_id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const nlb = new aws.ec2.TrafficMirrorTarget("nlb", {
    description: "NLB target",
    networkLoadBalancerArn: aws_lb.lb.arn,
});
const eni = new aws.ec2.TrafficMirrorTarget("eni", {
    description: "ENI target",
    networkInterfaceId: aws_instance.test.primary_network_interface_id,
});

Create a TrafficMirrorTarget Resource

new TrafficMirrorTarget(name: string, args?: TrafficMirrorTargetArgs, opts?: CustomResourceOptions);
@overload
def TrafficMirrorTarget(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        description: Optional[str] = None,
                        network_interface_id: Optional[str] = None,
                        network_load_balancer_arn: Optional[str] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        tags_all: Optional[Mapping[str, str]] = None)
@overload
def TrafficMirrorTarget(resource_name: str,
                        args: Optional[TrafficMirrorTargetArgs] = None,
                        opts: Optional[ResourceOptions] = None)
func NewTrafficMirrorTarget(ctx *Context, name string, args *TrafficMirrorTargetArgs, opts ...ResourceOption) (*TrafficMirrorTarget, error)
public TrafficMirrorTarget(string name, TrafficMirrorTargetArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TrafficMirrorTargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args TrafficMirrorTargetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TrafficMirrorTargetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TrafficMirrorTargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

TrafficMirrorTarget Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The TrafficMirrorTarget resource accepts the following input properties:

Description string
A description of the traffic mirror session.
NetworkInterfaceId string
The network interface ID that is associated with the target.
NetworkLoadBalancerArn string
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
Tags Dictionary<string, string>
TagsAll Dictionary<string, string>
Description string
A description of the traffic mirror session.
NetworkInterfaceId string
The network interface ID that is associated with the target.
NetworkLoadBalancerArn string
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
Tags map[string]string
TagsAll map[string]string
description string
A description of the traffic mirror session.
networkInterfaceId string
The network interface ID that is associated with the target.
networkLoadBalancerArn string
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
tags {[key: string]: string}
tagsAll {[key: string]: string}
description str
A description of the traffic mirror session.
network_interface_id str
The network interface ID that is associated with the target.
network_load_balancer_arn str
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
tags Mapping[str, str]
tags_all Mapping[str, str]

Outputs

All input properties are implicitly available as output properties. Additionally, the TrafficMirrorTarget resource produces the following output properties:

Arn string
The ARN of the traffic mirror target.
Id string
The provider-assigned unique ID for this managed resource.
OwnerId string
The ID of the AWS account that owns the traffic mirror target.
Arn string
The ARN of the traffic mirror target.
Id string
The provider-assigned unique ID for this managed resource.
OwnerId string
The ID of the AWS account that owns the traffic mirror target.
arn string
The ARN of the traffic mirror target.
id string
The provider-assigned unique ID for this managed resource.
ownerId string
The ID of the AWS account that owns the traffic mirror target.
arn str
The ARN of the traffic mirror target.
id str
The provider-assigned unique ID for this managed resource.
owner_id str
The ID of the AWS account that owns the traffic mirror target.

Look up an Existing TrafficMirrorTarget Resource

Get an existing TrafficMirrorTarget resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TrafficMirrorTargetState, opts?: CustomResourceOptions): TrafficMirrorTarget
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        description: Optional[str] = None,
        network_interface_id: Optional[str] = None,
        network_load_balancer_arn: Optional[str] = None,
        owner_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> TrafficMirrorTarget
func GetTrafficMirrorTarget(ctx *Context, name string, id IDInput, state *TrafficMirrorTargetState, opts ...ResourceOption) (*TrafficMirrorTarget, error)
public static TrafficMirrorTarget Get(string name, Input<string> id, TrafficMirrorTargetState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string
The ARN of the traffic mirror target.
Description string
A description of the traffic mirror session.
NetworkInterfaceId string
The network interface ID that is associated with the target.
NetworkLoadBalancerArn string
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
OwnerId string
The ID of the AWS account that owns the traffic mirror target.
Tags Dictionary<string, string>
TagsAll Dictionary<string, string>
Arn string
The ARN of the traffic mirror target.
Description string
A description of the traffic mirror session.
NetworkInterfaceId string
The network interface ID that is associated with the target.
NetworkLoadBalancerArn string
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
OwnerId string
The ID of the AWS account that owns the traffic mirror target.
Tags map[string]string
TagsAll map[string]string
arn string
The ARN of the traffic mirror target.
description string
A description of the traffic mirror session.
networkInterfaceId string
The network interface ID that is associated with the target.
networkLoadBalancerArn string
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
ownerId string
The ID of the AWS account that owns the traffic mirror target.
tags {[key: string]: string}
tagsAll {[key: string]: string}
arn str
The ARN of the traffic mirror target.
description str
A description of the traffic mirror session.
network_interface_id str
The network interface ID that is associated with the target.
network_load_balancer_arn str
The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
owner_id str
The ID of the AWS account that owns the traffic mirror target.
tags Mapping[str, str]
tags_all Mapping[str, str]

Import

Traffic mirror targets can be imported using the id, e.g.

 $ pulumi import aws:ec2/trafficMirrorTarget:TrafficMirrorTarget target tmt-0c13a005422b86606

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.