-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f44ead
commit 49236e9
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,53 @@ spec: | |
toFieldPath: "metadata.name" | ||
- fromFieldPath: "spec.parameters.region" | ||
toFieldPath: "spec.forProvider.locationConstraint" | ||
|
||
- name: bucketpolicy | ||
base: | ||
# see https://doc.crds.dev/github.com/crossplane/provider-aws/s3.aws.crossplane.io/Bucket/[email protected] | ||
apiVersion: s3.aws.crossplane.io/v1alpha3 | ||
kind: BucketPolicy | ||
metadata: | ||
name: bucketpolicy-public | ||
spec: | ||
forProvider: | ||
region: us-east-1 | ||
bucketNameRef: | ||
name: test-bucket | ||
policy: | ||
version: '2012-10-17' | ||
statements: | ||
- action: | ||
- s3:ListBucket | ||
- s3:GetBucketLocation | ||
- s3:ListBucketMultipartUploads | ||
- s3:PutBucketCORS | ||
effect: Allow | ||
principal: | ||
awsPrincipals: | ||
- iamUserArnSelector: | ||
matchLabels: | ||
example: "true" | ||
resource: | ||
# This is unfortunately not currently able to be inferred from a | ||
# reference to test-bucket, and must therefore be set to the ARN of | ||
# test-bucket (i.e. its actual external name). | ||
- "arn:aws:s3:::crossplane-example-bucket" | ||
condition: | ||
- operatorKey: StringEquals | ||
conditions: | ||
- key: "aws:Key1" | ||
stringValue: "value1" | ||
- key: "aws:Key2" | ||
stringValue: "value2" | ||
- operatorKey: IpAddress | ||
conditions: | ||
- key: "aws:SourceIp" | ||
stringValue: "192.0.2.0/24" | ||
- operatorKey: NotIpAddress | ||
conditions: | ||
- key: "aws:SourceIp" | ||
stringValue: "192.0.2.188/32" | ||
|
||
# If you find yourself repeating patches a lot you can group them as a named | ||
# 'patch set' then use a PatchSet type patch to reference them. | ||
|