Expand description
A Google Cloud Storage Managed Folder.
You can apply Identity and Access Management (IAM) policies to managed folders to grant principals access only to the objects within the managed folder, which lets you more finely control access for specific data sets and tables within a bucket. You can nest managed folders up to 15 levels deep, including the parent managed folder.
Managed folders can only be created in buckets that have uniform bucket-level access enabled.
To get more information about ManagedFolder, see:
- API documentation
- How-to Guides
§Example Usage
§Storage Managed Folder Basic
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let bucket = bucket::create(
"bucket",
BucketArgs::builder()
.location("EU")
.name("my-bucket")
.uniform_bucket_level_access(true)
.build_struct(),
);
let folder = managed_folder::create(
"folder",
ManagedFolderArgs::builder()
.bucket("${bucket.name}")
.force_destroy(true)
.name("managed/folder/name/")
.build_struct(),
);
}
§Import
ManagedFolder can be imported using any of these accepted formats:
-
{{bucket}}/managedFolders/{{name}}
-
{{bucket}}/{{name}}
When using the pulumi import
command, ManagedFolder can be imported using one of the formats above. For example:
$ pulumi import gcp:storage/managedFolder:ManagedFolder default {{bucket}}/managedFolders/{{name}}
$ pulumi import gcp:storage/managedFolder:ManagedFolder default {{bucket}}/{{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments