Terraform resource for managing an AWS AccessAnalyzer Archive Rule.
resource "aws_accessanalyzer_archive_rule" "example" {
analyzer_name = "example-analyzer"
rule_name = "example-rule"
filter {
criteria = "condition.aws:UserId"
eq = ["userid"]
}
filter {
criteria = "error"
exists = true
}
filter {
criteria = "isPublic"
eq = ["false"]
}
}
The following arguments are required:
analyzer_name
- (Required) Analyzer name.filter
- (Required) Filter criteria for the archive rule. See Filter for more details.rule_name
- (Required) Rule name.Note One comparator must be included with each filter.
criteria
- (Required) Filter criteria.contains
- (Optional) Contains comparator.eq
- (Optional) Equals comparator.exists
- (Optional) Boolean comparator.neq
- (Optional) Not Equals comparator.This resource exports the following attributes in addition to the arguments above:
id
- Resource ID in the format: analyzer_name/rule_name
.In Terraform v1.5.0 and later, use an import
block to import AccessAnalyzer ArchiveRule using the analyzer_name/rule_name
. For example:
import {
to = aws_accessanalyzer_archive_rule.example
id = "example-analyzer/example-rule"
}
Using terraform import
, import AccessAnalyzer ArchiveRule using the analyzer_name/rule_name
. For example:
% terraform import aws_accessanalyzer_archive_rule.example example-analyzer/example-rule