Skip to content

Commit

Permalink
skip: update autotest for sns, sqs
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-shcherbak committed May 31, 2024
1 parent c8283ec commit 0b7a252
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions auto_policy_testing/green/sns/sns.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
resource "aws_sns_topic" "this" {
name = "${module.naming.resource_prefix.sns}"
kms_master_key_id = data.terraform_remote_state.common.outputs.kms_key_arn
http_success_feedback_role_arn = aws_iam_role.success.arn
http_failure_feedback_role_arn = aws_iam_role.failure.arn
http_success_feedback_role_arn = aws_iam_role.this.arn
http_failure_feedback_role_arn = aws_iam_role.this.arn
}

resource "aws_sqs_queue" "this" {
name = "${module.naming.resource_prefix.sns}"
name = "${module.naming.resource_prefix.sqs}"
}

resource "aws_sns_topic_subscription" "this" {
Expand All @@ -29,20 +29,14 @@ resource "null_resource" "this" {
depends_on = [aws_sns_topic_subscription.this]
}

resource "aws_iam_role" "success" {
name = "${module.naming.resource_prefix.sns}-success"
assume_role_policy = data.aws_iam_policy_document.this.json
managed_policy_arns = [aws_iam_policy.this.arn]
}

resource "aws_iam_role" "failure" {
name = "${module.naming.resource_prefix.sns}-failure"
resource "aws_iam_role" "this" {
name = "${module.naming.resource_prefix.iam_role}"
assume_role_policy = data.aws_iam_policy_document.this.json
managed_policy_arns = [aws_iam_policy.this.arn]
}

resource "aws_iam_policy" "this" {
name = "${module.naming.resource_prefix.sns}"
name = "${module.naming.resource_prefix.iam_policy}"

policy = jsonencode({
Version = "2012-10-17"
Expand Down
2 changes: 1 addition & 1 deletion auto_policy_testing/red/sqs/sqs.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
resource "aws_sqs_queue" "this" {
provider = aws.provider2
name = "${module.naming.resource_prefix.sqs}"
delay_seconds = 90
max_message_size = 2048
message_retention_seconds = 86400
receive_wait_time_seconds = 10
provider = aws.provider2
}

resource "aws_sqs_queue_policy" "this" {
Expand Down

0 comments on commit 0b7a252

Please sign in to comment.