Skip to content
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

Subscriptions with filterPolicy set are in a SetSubscriptionAttributes loop #2071

Open
offzale opened this issue Jul 2, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@offzale
Copy link

offzale commented Jul 2, 2024

What happened?

When creating a Subscription with the field spec.forProvider.filterPolicy set, the provider gets in a loop of SetSubscriptionAttributes AWS API calls trying to update that attribute. The resources are ready and synced.

All the API calls have the following requestParameters:

"requestParameters": {
        "subscriptionArn": "arn:aws:sns:eu-west-1:000123456789:example-subscription:<aws-resource-id>",
        "attributeName": "FilterPolicy",
        "attributeValue": "{ \"status\": [\"EXAMPLE\"] }\n"
    },

How can we reproduce it?

Create a topic and a queue, then subscribe the queue to the topic setting the filterPolicy below.

apiVersion: sns.aws.crossplane.io/v1beta1
kind: Subscription
metadata:
  name: example
spec:
  deletionPolicy: Delete
  forProvider:
    endpoint: arn:aws:sqs:eu-west-1:000123456789:example-queue
    filterPolicy: |
      { "status": ["EXAMPLE"] }
    filterPolicyScope: MessageAttributes
    protocol: sqs
    rawMessageDelivery: "false"
    region: eu-west-1
    topicArn: arn:aws:sns:eu-west-1:000123456789:example-topic
  managementPolicies:
  - '*'
  providerConfigRef:
    name: aws

What environment did it happen in?

Crossplane version: 1.16.0
Provider version: 0.9.0

@offzale offzale added the bug Something isn't working label Jul 2, 2024
@offzale
Copy link
Author

offzale commented Jul 2, 2024

@MisterMX could this issue be related to the one that we had with the diff on the topics policy? 78bac9c

@MisterMX
Copy link
Collaborator

Yes, could be. Maybe AWS does some transformation to the policy when returning it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants