Skip to content

Commit

Permalink
fix, update variable doc
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 28, 2022
1 parent e78e87e commit 58e365f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@
* 0.2.3 -- 2022-03-28
- code 0.2.2 fixes for json.loads and API limits (#20, #22)

* 0.2.4 -- 2022-03-28
- add code to enable sqs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ No modules.
| <a name="input_create"></a> [create](#input\_create) | Flag to indicate whether to create the resources or not (default: true) | `bool` | `true` | no |
| <a name="input_dynamodb_table_name"></a> [dynamodb\_table\_name](#input\_dynamodb\_table\_name) | Different DynamoDB table name to override default of var.name | `string` | `null` | no |
| <a name="input_enable_sns"></a> [enable\_sns](#input\_enable\_sns) | Enable use of SNS for reporting errors | `bool` | `false` | no |
| <a name="input_enable_sqs"></a> [enable\_sqs](#input\_enable\_sqs) | Enable use of SQS for SNS to send errors | `bool` | `false` | no |
| <a name="input_enable_sqs"></a> [enable\_sqs](#input\_enable\_sqs) | Enable use of SQS for SNS to send errors. Requires the use of enable\_sns as well | `bool` | `false` | no |
| <a name="input_lambda_environment_variables"></a> [lambda\_environment\_variables](#input\_lambda\_environment\_variables) | Map of lambda environment variables and values | `map(string)` | <pre>{<br> "DNS_RR_TimeToLive": 60,<br> "DynamoDBName": null,<br> "HeritageIdentifier": "dynr53",<br> "HeritageTXTRecordPrefix": "_txt",<br> "MaxApiRetry": 10,<br> "SleepTime": 60,<br> "SnsEnable": false,<br> "SnsTopicArn": "",<br> "TagKeyCname": "boc:dns:cname",<br> "TagKeyHostName": "boc:dns:name",<br> "TagKeyZone": "boc:dns:zone"<br>}</pre> | no |
| <a name="input_lambda_environment_variables_override"></a> [lambda\_environment\_variables\_override](#input\_lambda\_environment\_variables\_override) | Map of lambda environment variables and values to override from the defaults | `map(string)` | `{}` | no |
| <a name="input_lambda_name"></a> [lambda\_name](#input\_lambda\_name) | Different Lambda name to override default of var.name | `string` | `null` | no |
Expand Down
3 changes: 2 additions & 1 deletion sqs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
sqs_name = var.sqs_queue_name != null ? var.sws_queue_name : local.name
sqs_name = var.sqs_queue_name != null ? var.sqs_queue_name : local.name
enable_sqs = var.enable_sns && var.enable_sqs
}

Expand Down Expand Up @@ -113,6 +113,7 @@ data "aws_iam_policy_document" "queue_sqs" {
}

resource "aws_sns_topic_subscription" "queue" {
count = var.create && local.enable_sqs ? 1 : 0
protocol = "sqs"
topic_arn = aws_sns_topic.topic[0].arn
endpoint = aws_sqs_queue.queue[0].arn
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ variable "enable_sns" {
}

variable "enable_sqs" {
description = "Enable use of SQS for SNS to send errors"
description = "Enable use of SQS for SNS to send errors. Requires the use of enable_sns as well"
type = bool
default = false
}
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "0.2.3"
_module_version = "0.2.4"
}

0 comments on commit 58e365f

Please sign in to comment.