Skip to content

Commit

Permalink
Merge both bucket notification examples
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Bush <[email protected]>
  • Loading branch information
mbbush committed Mar 18, 2024
1 parent 6da65a9 commit df2d01b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 86 deletions.
84 changes: 0 additions & 84 deletions examples/s3/v1beta1/bucketnotification-sqs.yaml

This file was deleted.

56 changes: 54 additions & 2 deletions examples/s3/v1beta1/bucketnotification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@ metadata:
testing.upbound.io/example-name: bucket-notification
spec:
forProvider:
region: us-west-1
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucket-notification
queue:
- events:
- "s3:ObjectCreated:*"
filterSuffix: ".log"
queueArnSelector:
matchLabels:
testing.upbound.io/example-name: bucket-notification
region: us-west-1
topic:
- events:
- "s3:ObjectCreated:*"
- "s3:ObjectRemoved:*"
filterSuffix: ".log"
topicArnSelector:
matchLabels:
Expand Down Expand Up @@ -80,3 +87,48 @@ spec:
}
]
}
---
apiVersion: sqs.aws.upbound.io/v1beta1
kind: Queue
metadata:
name: bucket-notification
annotations:
meta.upbound.io/example-id: s3/v1beta1/bucketnotification
labels:
testing.upbound.io/example-name: bucket-notification
spec:
forProvider:
region: us-west-1
name: bucket-notification

---
apiVersion: sqs.aws.upbound.io/v1beta1
kind: QueuePolicy
metadata:
name: bucket-notification
annotations:
meta.upbound.io/example-id: s3/v1beta1/bucketnotification
labels:
testing.upbound.io/example-name: bucket-notification
spec:
forProvider:
region: us-west-1
queueUrlSelector:
matchLabels:
testing.upbound.io/example-name: bucket-notification
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "example",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:us-west-1:*:bucket-notification"
}
]
}

0 comments on commit df2d01b

Please sign in to comment.