aws_sns_topic_policy
Provides an SNS topic policy resource
Example Usage
resource:
aws_sns_topic:
test:
name: my-topic-with-policy
aws_sns_topic_policy:
custom:
arn: '${aws_sns_topic.test.arn}'
policy: "{\n \"Version\": \"2012-10-17\",\n \"Id\": \"default\",\n \"Statement\":[{\n \"Sid\": \"default\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"AWS\":\"*\"},\n \"Action\": [\n \"SNS:GetTopicAttributes\",\n \"SNS:SetTopicAttributes\",\n \"SNS:AddPermission\",\n \"SNS:RemovePermission\",\n \"SNS:DeleteTopic\"\n ],\n \"Resource\": \"${aws_sns_topic.test.arn}\"\n }]\n}"
Argument Reference
The following arguments are supported:
arn
- (Required) The ARN of the SNS topicpolicy
- (Required) The fully-formed AWS policy as JSON
See the source of this document at Terraform.io