Skip to content

Resource: awsAccessanalyzerAnalyzer

Manages an Access Analyzer Analyzer. More information can be found in the Access Analyzer User Guide.

Example Usage

Account Analyzer

/*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.accessanalyzerAnalyzer.AccessanalyzerAnalyzer(this, "example", {
  analyzerName: "example",
});

Organization Analyzer

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsOrganizationsOrganizationExample =
  new aws.organizationsOrganization.OrganizationsOrganization(this, "example", {
    awsServiceAccessPrincipals: ["access-analyzer.amazonaws.com"],
  });
const awsAccessanalyzerAnalyzerExample =
  new aws.accessanalyzerAnalyzer.AccessanalyzerAnalyzer(this, "example_1", {
    analyzerName: "example",
    depends_on: [`\${${awsOrganizationsOrganizationExample.fqn}}`],
    type: "ORGANIZATION",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsAccessanalyzerAnalyzerExample.overrideLogicalId("example");

Argument Reference

The following arguments are required:

  • analyzerName - (Required) Name of the Analyzer.

The following arguments are optional:

  • tags - (Optional) Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  • type - (Optional) Type of Analyzer. Valid values are account or organization. Defaults to account.

Attributes Reference

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

  • arn - ARN of the Analyzer.
  • id - Analyzer name.
  • tagsAll - Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

Access Analyzer Analyzers can be imported using the analyzerName, e.g.,

$ terraform import aws_accessanalyzer_analyzer.example example