Resource: aws_ec2_traffic_mirror_filter#
Manages a traffic mirror filter. For details about traffic mirroring, see the user documentation.
Example Usage#
To create a basic traffic mirror filter, use:
resource "aws_ec2_traffic_mirror_filter" "foo" {
description = "traffic mirror filter - terraform example"
}
Argument Reference#
The following arguments are supported:
description- (Optional, Forces new resource) Description of the filter.tags- (Optional, Editable) Map of tags to assign to the traffic mirror filter. If a providerdefault_tagsconfiguration block is used, tags with matching keys will overwrite those defined at the provider level.
Attribute Reference#
In addition to all arguments above, the following attributes are exported:
arn- The Amazon Resource Name (ARN) of the traffic mirror filter.id- The ID of the traffic mirror filter.tags_all- Map of tags assigned to the traffic mirror filter, including those inherited from the providerdefault_tagsconfiguration block.
Import#
In Terraform v1.5.0 or later, traffic mirror filter can be imported by id using the import block.
import {
to = aws_ec2_traffic_mirror_filter.foo
id = "tmf-12345678"
}
In older Terraform versions, the traffic mirror filter can be imported by its id using terraform import, e.g.:
% terraform import aws_ec2_traffic_mirror_filter.foo tmf-12345678