Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#595 from ytsarev/s3-bucket-cann…
Browse files Browse the repository at this point in the history
…ed-acls

S3: BucketACL: Enable canned ACL support
  • Loading branch information
ytsarev committed Mar 8, 2023
2 parents 3e8a8c0 + 5eca6df commit 747b963
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 12 deletions.
7 changes: 4 additions & 3 deletions apis/s3/v1beta1/zz_bucketacl_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions apis/s3/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apis/s3/v1beta1/zz_generated_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion config/s3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ func Configure(p *config.Provider) {
})

p.AddResourceConfigurator("aws_s3_bucket_acl", func(r *config.Resource) {
config.MoveToStatus(r.TerraformResource, "acl")
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"acl", "access_control_policy"},
}
})

p.AddResourceConfigurator("aws_s3_bucket_metrics", func(r *config.Resource) {
Expand Down
1 change: 1 addition & 0 deletions examples-generated/cloudfront/distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ metadata:
name: b-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: b
Expand Down
1 change: 1 addition & 0 deletions examples-generated/cloudwatch/metricstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ metadata:
name: bucket-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucket
Expand Down
1 change: 1 addition & 0 deletions examples-generated/codepipeline/codepipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ metadata:
name: codepipeline-bucket-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: codepipeline_bucket
Expand Down
1 change: 1 addition & 0 deletions examples-generated/firehose/deliverystream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ metadata:
name: bucket-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucket
Expand Down
1 change: 1 addition & 0 deletions examples-generated/fsx/datarepositoryassociation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ metadata:
name: example
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example
Expand Down
1 change: 1 addition & 0 deletions examples-generated/kafka/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ metadata:
name: bucket-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucket
Expand Down
1 change: 1 addition & 0 deletions examples-generated/s3/bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
name: example
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: b
Expand Down
1 change: 1 addition & 0 deletions examples-generated/s3/bucketacl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
name: example-bucket-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example
Expand Down
2 changes: 2 additions & 0 deletions examples-generated/s3/bucketlogging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ metadata:
name: example
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example
Expand All @@ -76,6 +77,7 @@ metadata:
name: log-bucket-acl
spec:
forProvider:
acl: log-delivery-write
bucketSelector:
matchLabels:
testing.upbound.io/example-name: log_bucket
Expand Down
1 change: 1 addition & 0 deletions examples-generated/s3/bucketreplicationconfiguration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ metadata:
name: source-bucket-acl
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: source
Expand Down
1 change: 1 addition & 0 deletions examples-generated/s3/bucketversioning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ metadata:
name: example
spec:
forProvider:
acl: private
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example
Expand Down
27 changes: 27 additions & 0 deletions examples/s3/bucketacl-canned.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketACL
metadata:
annotations:
meta.upbound.io/example-id: s3/v1beta1/bucketacl-canned
name: example
spec:
forProvider:
region: us-west-1
bucketSelector:
matchLabels:
testing.upbound.io/example-name: s3-canned
acl: private
---
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
metadata:
annotations:
meta.upbound.io/example-id: s3/v1beta1/bucketacl-canned
name: ${Rand.RFC1123Subdomain}-canned
labels:
testing.upbound.io/example-name: s3-canned
spec:
forProvider:
region: us-west-1
tags:
Name: SampleBucketCannedAcl
6 changes: 3 additions & 3 deletions package/crds/s3.aws.upbound.io_bucketacls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ spec:
- owner
type: object
type: array
acl:
description: Canned ACL to apply to the bucket.
type: string
bucket:
description: Name of the bucket.
type: string
Expand Down Expand Up @@ -409,9 +412,6 @@ spec:
type: array
type: object
type: array
acl:
description: Canned ACL to apply to the bucket.
type: string
id:
description: The bucket, expected_bucket_owner (if configured),
and acl (if configured) separated by commas (,).
Expand Down

0 comments on commit 747b963

Please sign in to comment.