Resource: awsS3BucketRequestPaymentConfiguration
Provides an S3 bucket request payment configuration resource. For more information, see Requester Pays Buckets.
\~> NOTE: Destroying an awsS3BucketRequestPaymentConfiguration
resource resets the bucket's payer
to the S3 default: the bucket owner.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.s3BucketRequestPaymentConfiguration.S3BucketRequestPaymentConfiguration(
this,
"example",
{
bucket: "${aws_s3_bucket.example.id}",
payer: "Requester",
}
);
Argument Reference
The following arguments are supported:
bucket
- (Required, Forces new resource) Name of the bucket.expectedBucketOwner
- (Optional, Forces new resource) Account ID of the expected bucket owner.payer
- (Required) Specifies who pays for the download and request fees. Valid values:bucketOwner
,requester
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- Thebucket
orbucket
andexpectedBucketOwner
separated by a comma (,
) if the latter is provided.
Import
S3 bucket request payment configuration can be imported in one of two ways.
If the owner (account ID) of the source bucket is the same account used to configure the Terraform AWS Provider, the S3 bucket request payment configuration resource should be imported using the bucket
e.g.,
If the owner (account ID) of the source bucket differs from the account used to configure the Terraform AWS Provider, the S3 bucket request payment configuration resource should be imported using the bucket
and expectedBucketOwner
separated by a comma (,
) e.g.,