BucketACLArgs

data class BucketACLArgs(val bucket: Output<String>? = null, val defaultAcl: Output<String>? = null, val predefinedAcl: Output<String>? = null, val roleEntities: Output<List<String>>? = null) : ConvertibleToJava<BucketACLArgs>

Authoritatively manages a bucket's ACLs in Google cloud storage service (GCS). For more information see the official documentation and API. Bucket ACLs can be managed non authoritatively using the storage_bucket_access_control resource. Do not use these two resources in conjunction to manage the same bucket. Permissions can be granted either by ACLs or Cloud IAM policies. In general, permissions granted by Cloud IAM policies do not appear in ACLs, and permissions granted by ACLs do not appear in Cloud IAM policies. The only exception is for ACLs applied directly on a bucket and certain bucket-level Cloud IAM policies, as described in Cloud IAM relation to ACLs. NOTE This resource will not remove the project-owners-<project_id> entity from the OWNER role.

Example Usage

Example creating an ACL on a bucket with one owner, and one reader.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketACL;
import com.pulumi.gcp.storage.BucketACLArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var image_store = new Bucket("image-store", BucketArgs.builder()
.location("EU")
.build());
var image_store_acl = new BucketACL("image-store-acl", BucketACLArgs.builder()
.bucket(image_store.name())
.roleEntities(
"OWNER:user-my.email@gmail.com",
"READER:group-mygroup")
.build());
}
}

Import

This resource does not support import.

Constructors

Link copied to clipboard
constructor(bucket: Output<String>? = null, defaultAcl: Output<String>? = null, predefinedAcl: Output<String>? = null, roleEntities: Output<List<String>>? = null)

Properties

Link copied to clipboard
val bucket: Output<String>? = null

The name of the bucket it applies to.

Link copied to clipboard
val defaultAcl: Output<String>? = null

Configure this ACL to be the default ACL.

Link copied to clipboard
val predefinedAcl: Output<String>? = null

The canned GCS ACL to apply. Must be set if role_entity is not.

Link copied to clipboard
val roleEntities: Output<List<String>>? = null

List of role/entity pairs in the form ROLE:entity. See GCS Bucket ACL documentation for more details. Must be set if predefined_acl is not.

Functions

Link copied to clipboard
open override fun toJava(): BucketACLArgs