pulumi_wasm_providers_aws_mini::s3

Module bucket_public_access_block

source
Expand description

Manages S3 bucket-level Public Access Block configuration. For more information about these settings, see the AWS S3 Block Public Access documentation.

This resource cannot be used with S3 directory buckets.

§Example Usage

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let example = bucket_v_2::create(
        "example",
        BucketV2Args::builder().bucket("example").build_struct(),
    );
    let exampleBucketPublicAccessBlock = bucket_public_access_block::create(
        "exampleBucketPublicAccessBlock",
        BucketPublicAccessBlockArgs::builder()
            .block_public_acls(true)
            .block_public_policy(true)
            .bucket("${example.id}")
            .ignore_public_acls(true)
            .restrict_public_buckets(true)
            .build_struct(),
    );
}

§Import

Using pulumi import, import aws_s3_bucket_public_access_block using the bucket name. For example:

$ pulumi import aws:s3/bucketPublicAccessBlock:BucketPublicAccessBlock example my-bucket

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments