another terraform update
Signed-off-by: Bernd Verst <github@bernd.dev>
This commit is contained in:
parent
d8019c7c8b
commit
7b44ae9863
|
|
@ -29,13 +29,6 @@ provider "aws" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_sns_topic" "testTopic" {
|
|
||||||
name = "testTopic-${var.UNIQUE_ID}"
|
|
||||||
tags = {
|
|
||||||
dapr-topic-name = "testTopic-${var.UNIQUE_ID}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_sns_topic" "multiTopic1" {
|
resource "aws_sns_topic" "multiTopic1" {
|
||||||
name = "sqsssnscerttest-q1-${var.UNIQUE_ID}"
|
name = "sqsssnscerttest-q1-${var.UNIQUE_ID}"
|
||||||
tags = {
|
tags = {
|
||||||
|
|
@ -43,13 +36,6 @@ resource "aws_sns_topic" "multiTopic1" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_sns_topic" "multiTopic2" {
|
|
||||||
name = "sqsssnscerttest-q2-${var.UNIQUE_ID}"
|
|
||||||
tags = {
|
|
||||||
dapr-topic-name = "sqsssnscerttest-q2-${var.UNIQUE_ID}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_sqs_queue" "testQueue" {
|
resource "aws_sqs_queue" "testQueue" {
|
||||||
name = "testQueue-${var.UNIQUE_ID}"
|
name = "testQueue-${var.UNIQUE_ID}"
|
||||||
tags = {
|
tags = {
|
||||||
|
|
@ -63,18 +49,6 @@ resource "aws_sns_topic_subscription" "multiTopic1_testQueue" {
|
||||||
endpoint = aws_sqs_queue.testQueue.arn
|
endpoint = aws_sqs_queue.testQueue.arn
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_sns_topic_subscription" "multiTopic2_testQueue" {
|
|
||||||
topic_arn = aws_sns_topic.multiTopic2.arn
|
|
||||||
protocol = "sqs"
|
|
||||||
endpoint = aws_sqs_queue.testQueue.arn
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_sns_topic_subscription" "testTopic_testQueue" {
|
|
||||||
topic_arn = aws_sns_topic.testTopic.arn
|
|
||||||
protocol = "sqs"
|
|
||||||
endpoint = aws_sqs_queue.testQueue.arn
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_sqs_queue_policy" "testQueue_policy" {
|
resource "aws_sqs_queue_policy" "testQueue_policy" {
|
||||||
queue_url = "${aws_sqs_queue.testQueue.id}"
|
queue_url = "${aws_sqs_queue.testQueue.id}"
|
||||||
|
|
||||||
|
|
@ -93,9 +67,7 @@ resource "aws_sqs_queue_policy" "testQueue_policy" {
|
||||||
"Condition": {
|
"Condition": {
|
||||||
"ArnEquals": {
|
"ArnEquals": {
|
||||||
"aws:SourceArn": [
|
"aws:SourceArn": [
|
||||||
"${aws_sns_topic.testTopic.arn}",
|
"${aws_sns_topic.multiTopic1.arn}"
|
||||||
"${aws_sns_topic.multiTopic1.arn}",
|
|
||||||
"${aws_sns_topic.multiTopic2.arn}"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue