crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
137 stars 112 forks source link

fix(sqs): update loop queues.sqs #1356

Closed haarchri closed 2 weeks ago

haarchri commented 2 weeks ago

Description of your changes

We've observed update loops with the Queue.sqs resources when inline policies are given. The desired policy document in the spec can differ from the actual (observed) document

like:

{
    "Statement":[
        {
            "Sid":"example",
            "Effect":"Allow",
            "Principal":{
                "Service":"s3.amazonaws.com"
            },
            "Action":"sqs:SendMessage",
            "Resource":"arn:aws:sqs:us-west-1:*:queue-policy"
        }
    ]
}
{
    "Statement":[
        {
            "Action":"sqs:SendMessage",
            "Effect":"Allow",
            "Principal":{
                "Service":"s3.amazonaws.com"
            },
            "Resource":"arn:aws:sqs:us-west-1:*:queue-policy",
            "Sid":"example"
        }
    ],
    "Version":"2008-10-17"
}

so i used the custom diff which we implemented here also: https://github.com/crossplane-contrib/provider-upjet-aws/pull/1347

Fixes #

I have:

How has this code been tested

haarchri commented 2 weeks ago

can someone start uptest? ;) examples/sqs/v1beta1/queue-with-policy.yaml

ulucinar commented 2 weeks ago

/test-examples="examples/sqs/v1beta1/queue-with-policy.yaml"

turkenf commented 2 weeks ago

can someone start uptest? ;) examples/sqs/v1beta1/queue-with-policy.yaml

You should be able to trigger it too, @haarchri :)

turkenf commented 2 weeks ago

/test-examples="examples/sns/v1beta1/topic-with-policy.yaml"

github-actions[bot] commented 2 weeks ago

Successfully created backport PR #1361 for release-1.6.