Resource: aws_accessanalyzer_archive_rule

Terraform resource for managing an AWS AccessAnalyzer Archive Rule.

Example Usage

Basic Usage

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"]
  }
}

Argument Reference

The following arguments are required:

Filter

Note One comparator must be included with each filter.

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

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