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:
- API documentation
- How-to Guides
Create a PacketMirroring Resource
new PacketMirroring(name: string, args: PacketMirroringArgs, opts?: CustomResourceOptions);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);func NewPacketMirroring(ctx *Context, name string, args PacketMirroringArgs, opts ...ResourceOption) (*PacketMirroring, error)public PacketMirroring(string name, PacketMirroringArgs args, CustomResourceOptions? opts = null)- 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:
- Collector
Ilb PacketMirroring Collector Ilb Args 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 PacketMirroring Mirrored Resources Args A means of specifying which resources to mirror. Structure is documented below.
- Network
Packet
Mirroring Network Args 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
Packet
Mirroring Filter Args 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.
- Collector
Ilb PacketMirroring Collector Ilb 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 PacketMirroring Mirrored Resources A means of specifying which resources to mirror. Structure is documented below.
- Network
Packet
Mirroring Network 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
Packet
Mirroring Filter 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.
- collector
Ilb PacketMirroring Collector Ilb 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 PacketMirroring Mirrored Resources A means of specifying which resources to mirror. Structure is documented below.
- network
Packet
Mirroring Network 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
Packet
Mirroring Filter 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[PacketMirroring Collector Ilb] 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[PacketMirroring Mirrored Resources] A means of specifying which resources to mirror. Structure is documented below.
- network
Dict[Packet
Mirroring Network] 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[Packet
Mirroring Filter] 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:
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): PacketMirroringstatic 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:
- Collector
Ilb PacketMirroring Collector Ilb Args 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
Packet
Mirroring Filter Args A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
- Mirrored
Resources PacketMirroring Mirrored Resources Args A means of specifying which resources to mirror. Structure is documented below.
- Name string
The name of the packet mirroring rule
- Network
Packet
Mirroring Network Args 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.
- Collector
Ilb PacketMirroring Collector Ilb 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
Packet
Mirroring Filter A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
- Mirrored
Resources PacketMirroring Mirrored Resources A means of specifying which resources to mirror. Structure is documented below.
- Name string
The name of the packet mirroring rule
- Network
Packet
Mirroring Network 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.
- collector
Ilb PacketMirroring Collector Ilb 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
Packet
Mirroring Filter A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
- mirrored
Resources PacketMirroring Mirrored Resources A means of specifying which resources to mirror. Structure is documented below.
- name string
The name of the packet mirroring rule
- network
Packet
Mirroring Network 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[PacketMirroring Collector Ilb] 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[Packet
Mirroring Filter] A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
- mirrored_
resources Dict[PacketMirroring Mirrored Resources] A means of specifying which resources to mirror. Structure is documented below.
- name str
The name of the packet mirroring rule
- network
Dict[Packet
Mirroring Network] 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
PacketMirroringFilter
- Cidr
Ranges 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.
- Ip
Protocols List<string> Protocols that apply as a filter on mirrored traffic.
- Cidr
Ranges []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.
- Ip
Protocols []string Protocols that apply as a filter on mirrored traffic.
- cidr
Ranges 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.
- ip
Protocols string[] Protocols that apply as a filter on mirrored traffic.
- cidr
Ranges 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.
- ip
Protocols List[str] Protocols that apply as a filter on mirrored traffic.
PacketMirroringMirroredResources
- Instances
List<Packet
Mirroring Mirrored Resources Instance Args> All the listed instances will be mirrored. Specify at most 50. Structure is documented below.
- Subnetworks
List<Packet
Mirroring Mirrored Resources Subnetwork Args> All instances in one of these subnetworks will be mirrored. Structure is documented below.
- List<string>
All instances with these tags will be mirrored.
- Instances
[]Packet
Mirroring Mirrored Resources Instance All the listed instances will be mirrored. Specify at most 50. Structure is documented below.
- Subnetworks
[]Packet
Mirroring Mirrored Resources Subnetwork All instances in one of these subnetworks will be mirrored. Structure is documented below.
- []string
All instances with these tags will be mirrored.
- instances
Packet
Mirroring Mirrored Resources Instance[] All the listed instances will be mirrored. Specify at most 50. Structure is documented below.
- subnetworks
Packet
Mirroring Mirrored Resources Subnetwork[] All instances in one of these subnetworks will be mirrored. Structure is documented below.
- string[]
All instances with these tags will be mirrored.
- instances
List[Packet
Mirroring Mirrored Resources Instance] All the listed instances will be mirrored. Specify at most 50. Structure is documented below.
- subnetworks
List[Packet
Mirroring Mirrored Resources Subnetwork] All instances in one of these subnetworks will be mirrored. Structure is documented below.
- List[str]
All instances with these tags will be mirrored.
PacketMirroringMirroredResourcesInstance
PacketMirroringMirroredResourcesSubnetwork
PacketMirroringNetwork
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.