-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS: SNS Topic subscription ignores filter_policy_scope #2706
Comments
Hi there @prudnikov thank you for filing the issue and for the detailed report! This seems to be bug in the AWS provider, I will be moving the issue to pulumi-aws where the providers team can look into it |
I've managed to reproduce this filling the extra details for the program: import * as aws from "@pulumi/aws";
const topic = new aws.sns.Topic("dev-dataplatform-alerting-xxxx");
const queue = new aws.sqs.Queue("dev-dataplatform-alerting-xxxx");
export const sub = new aws.sns.TopicSubscription(
"dev-dataplatform-alerting-xxxx",
{
topic: topic.arn,
protocol: "sqs",
endpoint: queue.arn,
endpointAutoConfirms: true,
filterPolicy: '{"foo":["bar"]}',
filterPolicyScope: "MessageBody",
}
); Manual changesWhen editing the resource directly in the console then performing a refresh we see the following diff:
Preliminary InvestigationRelevant lines from the verbose log:
It therefore appears that we are passing the value correct as an input to the underlying provider, but the output value then doesn't match the input. This therefore seems likely to be an upstream issue - either in the TF provider logic, or the AWS service not honnoring the input provided. There's this special logic for handling the field in the diff: |
I think this is a duplicate of #2576 |
I can no longer replicate using the v6 version of pulumi-aws. |
What happened?
When creating
sns.TopicSubscription
there isfilter_policy_scope
property which have 2 options: "MessageAttributes" is default, and "MessageBody". No matter which value is used, it will always create a subscription with "Message Attributes" selected.Expected Behavior
When
filter_policy_scope="MessageBody"
it should create a subscription with "Message Body" filter policy.Steps to reproduce
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: