Resource: awsSnsTopicDataProtectionPolicy
Provides an SNS data protection topic policy resource
Example 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 awsSnsTopicExample = new aws.snsTopic.SnsTopic(this, "example", {
name: "example",
});
const awsSnsTopicDataProtectionPolicyExample =
new aws.snsTopicDataProtectionPolicy.SnsTopicDataProtectionPolicy(
this,
"example_1",
{
arn: awsSnsTopicExample.arn,
policy:
'${jsonencode(\n {\n "Description" = "Example data protection policy"\n "Name" = "__example_data_protection_policy"\n "Statement" = [\n {\n "DataDirection" = "Inbound"\n "DataIdentifier" = [\n "arn:aws:dataprotection::aws:data-identifier/EmailAddress",\n ]\n "Operation" = {\n "Deny" = {}\n }\n "Principal" = [\n "*",\n ]\n "Sid" = "__deny_statement_11ba9d96"\n },\n ]\n "Version" = "2021-06-01"\n }\n )}',
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSnsTopicDataProtectionPolicyExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
arn
- (Required) The ARN of the SNS topicpolicy
- (Required) The fully-formed AWS policy as JSON. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
Import
SNS Data Protection Topic Policy can be imported using the topic ARN, e.g.,