PacketMirroring

Packet Mirroring mirrors traffic to and from particular VM instances. You can use the collected traffic to help you detect security threats and monitor application performance.

To get more information about PacketMirroring, see:

Create a PacketMirroring Resource

def PacketMirroring(resource_name, opts=None, collector_ilb=None, description=None, filter=None, mirrored_resources=None, name=None, network=None, priority=None, project=None, region=None, __props__=None);
name string
The unique name of the resource.
args PacketMirroringArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PacketMirroringArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PacketMirroringArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

PacketMirroring Resource Properties

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

Inputs

The PacketMirroring resource accepts the following input properties:

CollectorIlb PacketMirroringCollectorIlbArgs

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

MirroredResources PacketMirroringMirroredResourcesArgs

A means of specifying which resources to mirror. Structure is documented below.

Network PacketMirroringNetworkArgs

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

Description string

A human-readable description of the rule.

Filter PacketMirroringFilterArgs

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

Name string

The name of the packet mirroring rule

Priority int

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

CollectorIlb PacketMirroringCollectorIlb

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

MirroredResources PacketMirroringMirroredResources

A means of specifying which resources to mirror. Structure is documented below.

Network PacketMirroringNetwork

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

Description string

A human-readable description of the rule.

Filter PacketMirroringFilter

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

Name string

The name of the packet mirroring rule

Priority int

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

collectorIlb PacketMirroringCollectorIlb

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

mirroredResources PacketMirroringMirroredResources

A means of specifying which resources to mirror. Structure is documented below.

network PacketMirroringNetwork

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

description string

A human-readable description of the rule.

filter PacketMirroringFilter

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

name string

The name of the packet mirroring rule

priority number

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

collector_ilb Dict[PacketMirroringCollectorIlb]

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

mirrored_resources Dict[PacketMirroringMirroredResources]

A means of specifying which resources to mirror. Structure is documented below.

network Dict[PacketMirroringNetwork]

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

description str

A human-readable description of the rule.

filter Dict[PacketMirroringFilter]

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

name str

The name of the packet mirroring rule

priority float

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region str

The Region in which the created address should reside. If it is not provided, the provider region is used.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing PacketMirroring Resource

Get an existing PacketMirroring 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?: PacketMirroringState, opts?: CustomResourceOptions): PacketMirroring
static get(resource_name, id, opts=None, collector_ilb=None, description=None, filter=None, mirrored_resources=None, name=None, network=None, priority=None, project=None, region=None, __props__=None);
func GetPacketMirroring(ctx *Context, name string, id IDInput, state *PacketMirroringState, opts ...ResourceOption) (*PacketMirroring, error)
public static PacketMirroring Get(string name, Input<string> id, PacketMirroringState? 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:

CollectorIlb PacketMirroringCollectorIlbArgs

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

Description string

A human-readable description of the rule.

Filter PacketMirroringFilterArgs

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

MirroredResources PacketMirroringMirroredResourcesArgs

A means of specifying which resources to mirror. Structure is documented below.

Name string

The name of the packet mirroring rule

Network PacketMirroringNetworkArgs

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

Priority int

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

CollectorIlb PacketMirroringCollectorIlb

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

Description string

A human-readable description of the rule.

Filter PacketMirroringFilter

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

MirroredResources PacketMirroringMirroredResources

A means of specifying which resources to mirror. Structure is documented below.

Name string

The name of the packet mirroring rule

Network PacketMirroringNetwork

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

Priority int

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

collectorIlb PacketMirroringCollectorIlb

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

description string

A human-readable description of the rule.

filter PacketMirroringFilter

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

mirroredResources PacketMirroringMirroredResources

A means of specifying which resources to mirror. Structure is documented below.

name string

The name of the packet mirroring rule

network PacketMirroringNetwork

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

priority number

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region string

The Region in which the created address should reside. If it is not provided, the provider region is used.

collector_ilb Dict[PacketMirroringCollectorIlb]

The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.

description str

A human-readable description of the rule.

filter Dict[PacketMirroringFilter]

A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.

mirrored_resources Dict[PacketMirroringMirroredResources]

A means of specifying which resources to mirror. Structure is documented below.

name str

The name of the packet mirroring rule

network Dict[PacketMirroringNetwork]

Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.

priority float

Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region str

The Region in which the created address should reside. If it is not provided, the provider region is used.

Supporting Types

PacketMirroringCollectorIlb

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Url string

The URL of the instances where this rule should be active.

Url string

The URL of the instances where this rule should be active.

url string

The URL of the instances where this rule should be active.

url str

The URL of the instances where this rule should be active.

PacketMirroringFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

CidrRanges List<string>

IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.

IpProtocols List<string>

Protocols that apply as a filter on mirrored traffic.

CidrRanges []string

IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.

IpProtocols []string

Protocols that apply as a filter on mirrored traffic.

cidrRanges string[]

IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.

ipProtocols string[]

Protocols that apply as a filter on mirrored traffic.

cidrRanges List[str]

IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.

ipProtocols List[str]

Protocols that apply as a filter on mirrored traffic.

PacketMirroringMirroredResources

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Instances List<PacketMirroringMirroredResourcesInstanceArgs>

All the listed instances will be mirrored. Specify at most 50. Structure is documented below.

Subnetworks List<PacketMirroringMirroredResourcesSubnetworkArgs>

All instances in one of these subnetworks will be mirrored. Structure is documented below.

Tags List<string>

All instances with these tags will be mirrored.

Instances []PacketMirroringMirroredResourcesInstance

All the listed instances will be mirrored. Specify at most 50. Structure is documented below.

Subnetworks []PacketMirroringMirroredResourcesSubnetwork

All instances in one of these subnetworks will be mirrored. Structure is documented below.

Tags []string

All instances with these tags will be mirrored.

instances PacketMirroringMirroredResourcesInstance[]

All the listed instances will be mirrored. Specify at most 50. Structure is documented below.

subnetworks PacketMirroringMirroredResourcesSubnetwork[]

All instances in one of these subnetworks will be mirrored. Structure is documented below.

tags string[]

All instances with these tags will be mirrored.

instances List[PacketMirroringMirroredResourcesInstance]

All the listed instances will be mirrored. Specify at most 50. Structure is documented below.

subnetworks List[PacketMirroringMirroredResourcesSubnetwork]

All instances in one of these subnetworks will be mirrored. Structure is documented below.

tags List[str]

All instances with these tags will be mirrored.

PacketMirroringMirroredResourcesInstance

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Url string

The URL of the instances where this rule should be active.

Url string

The URL of the instances where this rule should be active.

url string

The URL of the instances where this rule should be active.

url str

The URL of the instances where this rule should be active.

PacketMirroringMirroredResourcesSubnetwork

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Url string

The URL of the instances where this rule should be active.

Url string

The URL of the instances where this rule should be active.

url string

The URL of the instances where this rule should be active.

url str

The URL of the instances where this rule should be active.

PacketMirroringNetwork

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Url string

The URL of the instances where this rule should be active.

Url string

The URL of the instances where this rule should be active.

url string

The URL of the instances where this rule should be active.

url str

The URL of the instances where this rule should be active.

Package Details

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