Bucket Access Control
Example Usage
Storage Bucket Access Control Public Bucket
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.BucketAccessControl;
import com.pulumi.gcp.storage.BucketAccessControlArgs;
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 bucket = new Bucket("bucket", BucketArgs.builder()
.location("US")
.build());
var publicRule = new BucketAccessControl("publicRule", BucketAccessControlArgs.builder()
.bucket(bucket.name())
.role("READER")
.entity("allUsers")
.build());
}
}
Content copied to clipboard
Import
BucketAccessControl can be imported using any of these accepted formats
$ pulumi import gcp:storage/bucketAccessControl:BucketAccessControl default {{bucket}}/{{entity}}
Content copied to clipboard
Properties
Link copied to clipboard
The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user liz@example.com would be user-liz@example.com. The group example@googlegroups.com would be group-example@googlegroups.com. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
Link copied to clipboard