Expand description
Creates a new object inside an existing bucket in Google cloud storage service (GCS).
ACLs can be applied using the gcp.storage.ObjectACL
resource.
For more information see
the official documentation
and
API.
§Example Usage
Example creating a public object in an existing image-store
bucket.
resources:
picture:
type: gcp:storage:BucketObject
properties:
name: butterfly01
source:
fn::FileAsset: /images/nature/garden-tiger-moth.jpg
bucket: image-store
Example creating an empty folder in an existing image-store
bucket.
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let emptyFolder = bucket_object::create(
"emptyFolder",
BucketObjectArgs::builder()
.bucket("image-store")
.content(" ")
.name("empty_folder/")
.build_struct(),
);
}
§Import
This resource does not support import.
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