FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_sns_topic_policy

Provides an SNS topic policy resource

Example Usage

resource "aws_sns_topic" "test" {
  name = "my-topic-with-policy"
}

resource "aws_sns_topic_policy" "custom" {
  arn = "${aws_sns_topic.test.arn}"
  policy = <<POLICY
{
  "Version": "2012-10-17",
  "Id": "default",
  "Statement":[{
    "Sid": "default",
    "Effect": "Allow",
    "Principal": {"AWS":"*"},
    "Action": [
      "SNS:GetTopicAttributes",
      "SNS:SetTopicAttributes",
      "SNS:AddPermission",
      "SNS:RemovePermission",
      "SNS:DeleteTopic"
    ],
    "Resource": "${aws_sns_topic.test.arn}"
  }]
}
POLICY
}

Argument Reference

The following arguments are supported:


See the source of this document at Terraform.io