Expand description
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
§Example Usage
§Compute Packet Mirroring Full
resources:
mirror:
type: gcp:compute:Instance
properties:
networkInterfaces:
- accessConfigs:
- {}
network: ${default.id}
name: my-instance
machineType: e2-medium
bootDisk:
initializeParams:
image: debian-cloud/debian-11
default:
type: gcp:compute:Network
properties:
name: my-network
defaultSubnetwork:
type: gcp:compute:Subnetwork
name: default
properties:
name: my-subnetwork
network: ${default.id}
ipCidrRange: 10.2.0.0/16
defaultRegionBackendService:
type: gcp:compute:RegionBackendService
name: default
properties:
name: my-service
healthChecks: ${defaultHealthCheck.id}
defaultHealthCheck:
type: gcp:compute:HealthCheck
name: default
properties:
name: my-healthcheck
checkIntervalSec: 1
timeoutSec: 1
tcpHealthCheck:
port: '80'
defaultForwardingRule:
type: gcp:compute:ForwardingRule
name: default
properties:
name: my-ilb
isMirroringCollector: true
ipProtocol: TCP
loadBalancingScheme: INTERNAL
backendService: ${defaultRegionBackendService.id}
allPorts: true
network: ${default.id}
subnetwork: ${defaultSubnetwork.id}
networkTier: PREMIUM
options:
dependsOn:
- ${defaultSubnetwork}
foobar:
type: gcp:compute:PacketMirroring
properties:
name: my-mirroring
description: bar
network:
url: ${default.id}
collectorIlb:
url: ${defaultForwardingRule.id}
mirroredResources:
tags:
- foo
instances:
- url: ${mirror.id}
filter:
ipProtocols:
- tcp
cidrRanges:
- 0.0.0.0/0
direction: BOTH
§Import
PacketMirroring can be imported using any of these accepted formats:
-
projects/{{project}}/regions/{{region}}/packetMirrorings/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, PacketMirroring can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/packetMirroring:PacketMirroring default projects/{{project}}/regions/{{region}}/packetMirrorings/{{name}}
$ pulumi import gcp:compute/packetMirroring:PacketMirroring default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/packetMirroring:PacketMirroring default {{region}}/{{name}}
$ pulumi import gcp:compute/packetMirroring:PacketMirroring default {{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments