Skip to content

Resource: awsSchemasRegistryPolicy

Terraform resource for managing an AWS EventBridge Schemas Registry Policy.

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";
const dataAwsIamPolicyDocumentExample =
  new aws.dataAwsIamPolicyDocument.DataAwsIamPolicyDocument(this, "example", {
    statement: [
      {
        actions: ["schemas:*"],
        effect: "Allow",
        principals: [
          {
            identifiers: ["109876543210"],
            type: "AWS",
          },
        ],
        resources: [
          "arn:aws:schemas:us-east-1:012345678901:registry/example",
          "arn:aws:schemas:us-east-1:012345678901:schema/example*",
        ],
        sid: "example",
      },
    ],
  });
const awsSchemasRegistryPolicyExample =
  new aws.schemasRegistryPolicy.SchemasRegistryPolicy(this, "example_1", {
    policy: dataAwsIamPolicyDocumentExample.json,
    registryName: "example",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSchemasRegistryPolicyExample.overrideLogicalId("example");

Argument Reference

The following arguments are required:

  • registryName - (Required) Name of EventBridge Schema Registry
  • policy - (Required) Resource Policy for EventBridge Schema Registry

Attributes Reference

No additional attributes are exported.

Timeouts

Configuration options:

  • create - (Default 5M)
  • update - (Default 5M)
  • delete - (Default 5M)

Import

EventBridge Schema Registry Policy can be imported using the registryName, e.g.,

$ terraform import aws_schemas_registry_policy.example example