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

Update handling of SQS Queues #44

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

stevendborrelli
Copy link
Member

Description of your changes

Update SQS Queue handling:

  • tags can be handled by default
  • fix redrivePolicy logic

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

tested with the following manifest:

apiVersion: sqs.aws.crossplane.io/v1beta1
kind: Queue
metadata:
  labels:
    example.tech/infra-revision: "0.1.131"
    crossplane.io/provider-version: v0.42.0
  name: crossplane-official-provider-test
  namespace:
  annotations:
    argocd.argoproj.io/sync-wave: "5"
spec:
  forProvider:
    region: us-east-1
    delaySeconds: 10
    maximumMessageSize: 262144
    messageRetentionPeriod: 345600
    receiveMessageWaitTimeSeconds: 0
    visibilityTimeout: 30
    sseEnabled: true
    policy: |
      {
        "Version": "2012-10-17",
        "Id": "crossplane-official-provider-test-crossplane-official-provider-test",
        "Statement": [
          {
            "Sid": "BasicSQS",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
              "sqs:DeleteMessage",
              "sqs:SendMessage"
            ],
            "Resource": "arn:aws:sqs:us-east-1:1234567890:crossplane-official-provider-test",
            "Condition": {
              "StringLikeIfExists": {
                "aws:SourceAccount": "1234567890"
              }
            }
          }
        ]
      }
    redrivePolicy:
      deadLetterTargetArnRef:
       name: crossplane-official-provider-test-crossplane-official-provider-test-dlq
      maxReceiveCount: 10
    tags:
      App: crossplane-official-provider-test
      Environment: dev
      Name: crossplane-official-provider-test
      Tier: backend
      VS: sandbox
  providerConfigRef:
    name: awsconfig

Signed-off-by: Steven Borrelli <[email protected]>
@stevendborrelli
Copy link
Member Author

@haooliveira84 can you review?

Copy link
Contributor

@haooliveira84 haooliveira84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll left a change

converters/provider-aws/sqs/queue.go Outdated Show resolved Hide resolved
Signed-off-by: Steven Borrelli <[email protected]>
Copy link
Contributor

@haooliveira84 haooliveira84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stevendborrelli LGTM!

@sergenyalcin sergenyalcin merged commit 4e91b66 into upbound:main Dec 5, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants