Skip to content

Resource: awsAccessanalyzerArchiveRule

Terraform resource for managing an AWS AccessAnalyzer Archive Rule.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.accessanalyzerArchiveRule.AccessanalyzerArchiveRule(this, "example", {
  analyzerName: "example-analyzer",
  filter: [
    {
      criteria: "condition.aws:UserId",
      eq: ["userid"],
    },
    {
      criteria: "error",
      exists: true,
    },
    {
      criteria: "isPublic",
      eq: ["false"],
    },
  ],
  ruleName: "example-rule",
});

Argument Reference

The following arguments are required:

  • analyzerName - (Required) Analyzer name.
  • filter - (Required) Filter criteria for the archive rule. See Filter for more details.
  • ruleName - (Required) Rule name.

Filter

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.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - Resource ID in the format: analyzerName/ruleName.

Import

AccessAnalyzer ArchiveRule can be imported using the analyzerName/ruleName, e.g.,

$ terraform import aws_accessanalyzer_archive_rule.example example-analyzer/example-rule