{
 "Description": "Integration Test for aws-sns-sqs FIFO Queue",
 "Resources": {
  "TestTopic339EC197": {
   "Type": "AWS::SNS::Topic",
   "Properties": {
    "ContentBasedDeduplication": true,
    "DisplayName": "Customer subscription topic",
    "FifoTopic": true,
    "KmsMasterKeyId": {
     "Fn::Join": [
      "",
      [
       "arn:",
       {
        "Ref": "AWS::Partition"
       },
       ":kms:",
       {
        "Ref": "AWS::Region"
       },
       ":",
       {
        "Ref": "AWS::AccountId"
       },
       ":alias/aws/sns"
      ]
     ]
    },
    "TopicName": "snssqsdeployFIFOQueue-TestTopic-E42F11A6.fifo"
   }
  },
  "ImportedEncryptionKeyBE10B2FC": {
   "Type": "AWS::KMS::Key",
   "Properties": {
    "EnableKeyRotation": true,
    "KeyPolicy": {
     "Statement": [
      {
       "Action": "kms:*",
       "Effect": "Allow",
       "Principal": {
        "AWS": {
         "Fn::Join": [
          "",
          [
           "arn:",
           {
            "Ref": "AWS::Partition"
           },
           ":iam::",
           {
            "Ref": "AWS::AccountId"
           },
           ":root"
          ]
         ]
        }
       },
       "Resource": "*"
      },
      {
       "Action": [
        "kms:Decrypt",
        "kms:GenerateDataKey"
       ],
       "Condition": {
        "ArnEquals": {
         "aws:SourceArn": {
          "Ref": "TestTopic339EC197"
         }
        }
       },
       "Effect": "Allow",
       "Principal": {
        "Service": "sns.amazonaws.com"
       },
       "Resource": "*"
      }
     ],
     "Version": "2012-10-17"
    }
   },
   "UpdateReplacePolicy": "Delete",
   "DeletionPolicy": "Delete"
  },
  "ImportedDLQEncryptionKeyDE178CD5": {
   "Type": "AWS::KMS::Key",
   "Properties": {
    "EnableKeyRotation": true,
    "KeyPolicy": {
     "Statement": [
      {
       "Action": "kms:*",
       "Effect": "Allow",
       "Principal": {
        "AWS": {
         "Fn::Join": [
          "",
          [
           "arn:",
           {
            "Ref": "AWS::Partition"
           },
           ":iam::",
           {
            "Ref": "AWS::AccountId"
           },
           ":root"
          ]
         ]
        }
       },
       "Resource": "*"
      }
     ],
     "Version": "2012-10-17"
    }
   },
   "UpdateReplacePolicy": "Delete",
   "DeletionPolicy": "Delete"
  },
  "testsnssqsqueuedlq3331312B": {
   "Type": "AWS::SQS::Queue",
   "Properties": {
    "FifoQueue": true,
    "KmsMasterKeyId": {
     "Fn::GetAtt": [
      "ImportedDLQEncryptionKeyDE178CD5",
      "Arn"
     ]
    }
   },
   "UpdateReplacePolicy": "Delete",
   "DeletionPolicy": "Delete"
  },
  "testsnssqsqueuedlqPolicy63646E47": {
   "Type": "AWS::SQS::QueuePolicy",
   "Properties": {
    "PolicyDocument": {
     "Statement": [
      {
       "Action": [
        "sqs:AddPermission",
        "sqs:DeleteMessage",
        "sqs:GetQueueAttributes",
        "sqs:ReceiveMessage",
        "sqs:RemovePermission",
        "sqs:SendMessage",
        "sqs:SetQueueAttributes"
       ],
       "Effect": "Allow",
       "Principal": {
        "AWS": {
         "Fn::Join": [
          "",
          [
           "arn:",
           {
            "Ref": "AWS::Partition"
           },
           ":iam::",
           {
            "Ref": "AWS::AccountId"
           },
           ":root"
          ]
         ]
        }
       },
       "Resource": {
        "Fn::GetAtt": [
         "testsnssqsqueuedlq3331312B",
         "Arn"
        ]
       },
       "Sid": "QueueOwnerOnlyAccess"
      },
      {
       "Action": "SQS:*",
       "Condition": {
        "Bool": {
         "aws:SecureTransport": "false"
        }
       },
       "Effect": "Deny",
       "Principal": {
        "AWS": "*"
       },
       "Resource": {
        "Fn::GetAtt": [
         "testsnssqsqueuedlq3331312B",
         "Arn"
        ]
       },
       "Sid": "HttpsOnly"
      }
     ],
     "Version": "2012-10-17"
    },
    "Queues": [
     {
      "Ref": "testsnssqsqueuedlq3331312B"
     }
    ]
   }
  },
  "testsnssqsqueueB02504BF": {
   "Type": "AWS::SQS::Queue",
   "Properties": {
    "FifoQueue": true,
    "KmsMasterKeyId": {
     "Fn::GetAtt": [
      "ImportedEncryptionKeyBE10B2FC",
      "Arn"
     ]
    },
    "RedrivePolicy": {
     "deadLetterTargetArn": {
      "Fn::GetAtt": [
       "testsnssqsqueuedlq3331312B",
       "Arn"
      ]
     },
     "maxReceiveCount": 15
    }
   },
   "UpdateReplacePolicy": "Delete",
   "DeletionPolicy": "Delete"
  },
  "testsnssqsqueuePolicyE64464B6": {
   "Type": "AWS::SQS::QueuePolicy",
   "Properties": {
    "PolicyDocument": {
     "Statement": [
      {
       "Action": [
        "sqs:AddPermission",
        "sqs:DeleteMessage",
        "sqs:GetQueueAttributes",
        "sqs:ReceiveMessage",
        "sqs:RemovePermission",
        "sqs:SendMessage",
        "sqs:SetQueueAttributes"
       ],
       "Effect": "Allow",
       "Principal": {
        "AWS": {
         "Fn::Join": [
          "",
          [
           "arn:",
           {
            "Ref": "AWS::Partition"
           },
           ":iam::",
           {
            "Ref": "AWS::AccountId"
           },
           ":root"
          ]
         ]
        }
       },
       "Resource": {
        "Fn::GetAtt": [
         "testsnssqsqueueB02504BF",
         "Arn"
        ]
       },
       "Sid": "QueueOwnerOnlyAccess"
      },
      {
       "Action": "SQS:*",
       "Condition": {
        "Bool": {
         "aws:SecureTransport": "false"
        }
       },
       "Effect": "Deny",
       "Principal": {
        "AWS": "*"
       },
       "Resource": {
        "Fn::GetAtt": [
         "testsnssqsqueueB02504BF",
         "Arn"
        ]
       },
       "Sid": "HttpsOnly"
      },
      {
       "Action": "sqs:SendMessage",
       "Condition": {
        "ArnEquals": {
         "aws:SourceArn": {
          "Ref": "TestTopic339EC197"
         }
        }
       },
       "Effect": "Allow",
       "Principal": {
        "Service": "sns.amazonaws.com"
       },
       "Resource": {
        "Fn::GetAtt": [
         "testsnssqsqueueB02504BF",
         "Arn"
        ]
       }
      }
     ],
     "Version": "2012-10-17"
    },
    "Queues": [
     {
      "Ref": "testsnssqsqueueB02504BF"
     }
    ]
   }
  },
  "testsnssqsqueuesnssqsdeployFIFOQueueTestTopicE42F11A6E8D5756E": {
   "Type": "AWS::SNS::Subscription",
   "Properties": {
    "Endpoint": {
     "Fn::GetAtt": [
      "testsnssqsqueueB02504BF",
      "Arn"
     ]
    },
    "Protocol": "sqs",
    "TopicArn": {
     "Ref": "TestTopic339EC197"
    }
   },
   "DependsOn": [
    "testsnssqsqueuePolicyE64464B6"
   ]
  }
 },
 "Parameters": {
  "BootstrapVersion": {
   "Type": "AWS::SSM::Parameter::Value<String>",
   "Default": "/cdk-bootstrap/hnb659fds/version",
   "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
  }
 },
 "Rules": {
  "CheckBootstrapVersion": {
   "Assertions": [
    {
     "Assert": {
      "Fn::Not": [
       {
        "Fn::Contains": [
         [
          "1",
          "2",
          "3",
          "4",
          "5"
         ],
         {
          "Ref": "BootstrapVersion"
         }
        ]
       }
      ]
     },
     "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
    }
   ]
  }
 }
}