I have a single SNS topic. I have multiple users who belong to different groups and will need dfferent filters applied to them so that they only get emails when there are specific MessageAttributes applied to the SNS message.
I have that part set up, however, I have like below:
[
{
"email" = "[email protected]"
"filters" = tolist([
"FILTERFOO",
])
},
{
"email" = "[email protected]"
"filters" = tolist([
"FILTERBAR",
])
},
{
"email" = "[email protected]"
"filters" = tolist([
"FILTERFOO",
])
},
]
The problem with the above is that the user will get mutiple subscription confirmations and the filters are overwritten depending on which is confirmed first.
I need to merge that into the following so that the user only gets ONE subscription confirmation email
[
{ email: "[email protected]", filters: ["FILTERFOO", "FILTERBAR"] },
{ email: "[email protected]", filters: ["FILTERFOO"] },
]
Is this possible with Terraform? I have followed THIS example but I just ended up with a number object containing the same duplicate emails.