Skip to content

Commit

Permalink
Update docs to add fifo_topic and content_based_deduplication for SNS…
Browse files Browse the repository at this point in the history
… Topics
  • Loading branch information
tomekr committed Oct 24, 2020
1 parent 9cdf5bb commit b2c3615
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions website/docs/r/sns_topic.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "aws_sns_topic" "user_updates" {

## Example with Delivery Policy

``` hcl
```hcl
resource "aws_sns_topic" "user_updates" {
name = "user-updates-topic"
delivery_policy = <<EOF
Expand Down Expand Up @@ -54,40 +54,52 @@ resource "aws_sns_topic" "user_updates" {
}
```

## Example with First-In-First-Out (FIFO)

```hcl
resource "aws_sns_topic" "user_updates" {
name = "user-updates-topic"
fifo_topic = true
content_based_deduplication = true
}
```

## Message Delivery Status Arguments

The `<endpoint>_success_feedback_role_arn` and `<endpoint>_failure_feedback_role_arn` arguments are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The `<endpoint>_success_feedback_sample_rate` argument is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the `<endpoint>_failure_feedback_role_arn` argument, then all failed message deliveries generate CloudWatch Logs.
The `<endpoint>_success_feedback_role_arn` and `<endpoint>_failure_feedback_role_arn` arguments are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The `<endpoint>_success_feedback_sample_rate` argument is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the `<endpoint>_failure_feedback_role_arn` argument, then all failed message deliveries generate CloudWatch Logs.

## Argument Reference

The following arguments are supported:

* `name` - (Optional) The friendly name for the SNS topic. By default generated by Terraform.
* `name_prefix` - (Optional) The friendly name for the SNS topic. Conflicts with `name`.
* `display_name` - (Optional) The display name for the SNS topic
* `policy` - (Optional) 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](https://learn.hashicorp.com/terraform/aws/iam-policy).
* `delivery_policy` - (Optional) The SNS delivery policy. More on [AWS documentation](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html)
* `application_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
* `application_success_feedback_sample_rate` - (Optional) Percentage of success to sample
* `application_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
* `http_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
* `http_success_feedback_sample_rate` - (Optional) Percentage of success to sample
* `http_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
* `kms_master_key_id` - (Optional) The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key Terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms)
* `lambda_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
* `lambda_success_feedback_sample_rate` - (Optional) Percentage of success to sample
* `lambda_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
* `sqs_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
* `sqs_success_feedback_sample_rate` - (Optional) Percentage of success to sample
* `sqs_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
* `tags` - (Optional) Key-value map of resource tags
- `name` - (Optional) The friendly name for the SNS topic. By default generated by Terraform.
- `name_prefix` - (Optional) The friendly name for the SNS topic. Conflicts with `name`.
- `display_name` - (Optional) The display name for the SNS topic
- `policy` - (Optional) 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](https://learn.hashicorp.com/terraform/aws/iam-policy).
- `delivery_policy` - (Optional) The SNS delivery policy. More on [AWS documentation](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html)
- `application_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
- `application_success_feedback_sample_rate` - (Optional) Percentage of success to sample
- `application_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
- `http_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
- `http_success_feedback_sample_rate` - (Optional) Percentage of success to sample
- `http_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
- `kms_master_key_id` - (Optional) The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key Terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms)
- `fifo_topic` - (Optional) Boolean indicating whether or not to make the topic First-In-First-Out (FIFO) (default is `false`).
- `content_based_deduplication` - (Optional) Enables content-based deduplication for FIFO topics. For more information, see the [related documentation](https://docs.aws.amazon.com/sns/latest/dg/fifo-message-dedup.html)
- `lambda_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
- `lambda_success_feedback_sample_rate` - (Optional) Percentage of success to sample
- `lambda_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
- `sqs_success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this topic
- `sqs_success_feedback_sample_rate` - (Optional) Percentage of success to sample
- `sqs_failure_feedback_role_arn` - (Optional) IAM role for failure feedback
- `tags` - (Optional) Key-value map of resource tags

## Attributes Reference

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

* `id` - The ARN of the SNS topic
* `arn` - The ARN of the SNS topic, as a more obvious property (clone of id)
- `id` - The ARN of the SNS topic
- `arn` - The ARN of the SNS topic, as a more obvious property (clone of id)

## Import

Expand Down

0 comments on commit b2c3615

Please sign in to comment.