terraform-encrypted-sqs-sns's People
terraform-encrypted-sqs-sns's Issues
SQS InvalidAttributeValue Errors
Hi @xpolb01 ,
I used this code to create a topics and queues. Just removed the encryption part from the code.
When I try to execute the "terraform apply" I'm getting below error:
Error: Error applying plan:
1 error(s) occurred:
-
aws_sqs_queue_policy.user_sqs_policy: 1 error(s) occurred:
-
aws_sqs_queue_policy.user_sqs_policy: Error updating SQS attributes: InvalidAttributeValue: Invalid value for the parameter Policy.
status code: 400, request id: b35b2878-7783-5841-aaba-7b9b2d7d827c
Code Snippet:
module "user_sqs" {
source = "modules/sqs"
region = "${var.region}"
environment = "${terraform.workspace}" // name of the workspace we are in
name = "user"
}
module "blog_sqs" {
source = "modules/sqs"
region = "${var.region}"
environment = "${terraform.workspace}"
name = "blog"
}
locals {
user_topic_arns = ["${module.new-user.topic_arn}"]
blog_topic_arns = ["${module.new-user.topic_arn}", "${module.new-blog.topic_arn}"]
}
resource "aws_sqs_queue_policy" "user_sqs_policy" {
queue_url = "${module.user_sqs.queue_id}"
policy = <<POLICY
{
"Version": "2012–10–17",
"Id": "sns-to-user-queue-${terraform.workspace}-sqspolicy",
"Statement": [{
"Sid": "SNSToSQSPolicy${terraform.workspace}",
"Effect": "Allow",
"Principal": "",
"Action": "sqs:SendMessage",
"Resource": "${module.user_sqs.queue_arn}",
"Condition": {
"ArnEquals": {
"aws:SourceArn": ${jsonencode(local.user_topic_arns)}
}
}
}]
}
POLICY
}
/
resource "aws_sqs_queue_policy" "blog_sqs_policy" {
queue_url = "${module.blog_sqs.queue_id}"
policy = <<POLICY
{
"Version":"2012–10–17",
"Id": "sns-to-blog-queue-${terraform.workspace}-sqspolicy",
"Statement":[
{
"Sid":"SNSToSQSPolicy${terraform.workspace}",
"Effect":"Allow",
"Principal":"*",
"Action":"sqs:SendMessage",
"Resource":"${module.blog_sqs.queue_arn}",
"Condition":{
"ArnEquals":{
"aws:SourceArn": ${jsonencode(local.blog_topic_arns)}
}
}
}
]
}
POLICY
}
*/
Could you please help to fix this issue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.