BucketPolicy is the Schema for the BucketPolicys API. Attaches a policy to an S3 bucket resource.
Type
CRD
Group
s3.aws.upbound.io
Version
v1beta1
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
BucketPolicySpec defines the desired state of BucketPolicy
No description provided.
Reference to a Bucket in s3 to populate bucket.
Policies for referencing.
Selector for a Bucket in s3 to populate bucket.
Policies for selection.
ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured.
Policies for referencing.
ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. providerConfigRef
Policies for referencing.
PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret store config to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource.
WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. This field is planned to be replaced in a future release in favor of PublishConnectionDetailsTo. Currently, both could be set independently and connection details would be published to both without affecting each other.
BucketPolicyStatus defines the observed state of BucketPolicy.
No description provided.
Conditions of the resource.
hoge
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: ssm/v1beta1/resourcedatasync
labels:
testing.upbound.io/example-name: hoge
name: hoge
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: hoge
policy: >
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "SSMBucketPermissionsCheck",
"Effect": "Allow",
"Principal": {
"Service": "ssm.amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::ssm-resourcedatasync-cnjbekjbsjcgfwlwfewfw"
},
{
"Sid": " SSMBucketDelivery",
"Effect": "Allow",
"Principal": {
"Service": "ssm.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": ["arn:aws:s3:::ssm-resourcedatasync-cnjbekjbsjcgfwlwfewfw/*"],
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
}
]
}
region: us-west-1
s3-policy
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/devicefleet
labels:
testing.upbound.io/example-name: s3-policy
name: s3-policy
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucketname012
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::${data.aws_account_id}:role/example"
},
"Action": "*",
"Resource": [
"arn:aws:s3:::bucketname012",
"arn:aws:s3:::bucketname012/*"
]
}
]
}
region: us-east-1
example
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: cur/v1beta1/reportdefinition
labels:
testing.upbound.io/example-name: example_cur_report_definition
name: example
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example
policy: >
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "billingreports.amazonaws.com"
},
"Action": [
"s3:GetBucketAcl",
"s3:GetBucketPolicy"
],
"Resource":"arn:aws:s3:::test-definition-bucket-axbjhdwjdk",
"Condition": {
"StringEquals": {
"aws:SourceArn": "arn:aws:cur:us-east-1:${data.aws_account_id}:definition/*",
"aws:SourceAccount": "${data.aws_account_id}"
}
}
},
{
"Sid": "Stmt1335892526596",
"Effect": "Allow",
"Principal": {
"Service": "billingreports.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::test-definition-bucket-axbjhdwjdk/*",
"Condition": {
"StringEquals": {
"aws:SourceArn": "arn:aws:cur:us-east-1:${data.aws_account_id}:definition/*",
"aws:SourceAccount": "${data.aws_account_id}"
}
}
}
]
}
region: us-east-1
s3-policy
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: sagemaker/v1beta1/device
labels:
testing.upbound.io/example-name: s3-policy
name: s3-policy
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucketname012
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::${data.aws_account_id}:role/example"
},
"Action": "*",
"Resource": [
"arn:aws:s3:::bucketname012",
"arn:aws:s3:::bucketname012/*"
]
}
]
}
region: us-east-1
foo
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: cloudtrail/v1beta1/trail
labels:
testing.upbound.io/example-name: foo
name: foo
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: foo
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AWSCloudTrailAclCheck",
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::op-rgszzcuww"
},
{
"Sid": "AWSCloudTrailWrite",
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::op-rgszzcuww/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
}
]
}
region: us-west-1
example-source
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: appflow/v1beta1/flow
labels:
testing.upbound.io/example-name: example_source
name: example-source
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example_source
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAppFlowSourceActions",
"Effect": "Allow",
"Principal":"*",
"Action": [
"s3:ListBucket",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::example-source-rand123",
"arn:aws:s3:::example-source-rand123/*"
]
}
]
}
region: us-west-1
example-destination
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: appflow/v1beta1/flow
labels:
testing.upbound.io/example-name: example_destination
name: example-destination
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: example_destination
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAppFlowDestinationActions",
"Effect": "Allow",
"Principal":"*",
"Action": [
"s3:PutObject",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts",
"s3:ListBucketMultipartUploads",
"s3:GetBucketAcl",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::example-destination-rand123",
"arn:aws:s3:::example-destination-rand123/*"
]
}
]
}
region: us-west-1
example
apiVersion: s3.aws.upbound.io/v1beta1
kind: BucketPolicy
metadata:
annotations:
meta.upbound.io/example-id: s3/v1beta1/bucketpolicy
upjet.upbound.io/manual-intervention: The bucket ARN in policy should be changed manually.
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: s3
policy: >
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject", "s3:ListBucket"],
"Resource": [ "arn:aws:s3:::<bucket name>", "arn:aws:s3:::<bucket name>/*"]
}
]
}
region: us-west-1
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.