published on Tuesday, Oct 20, 2026 by Pulumi
published on Tuesday, Oct 20, 2026 by Pulumi
Bucket configuration for storing observability data.
Example Usage
Create Bucket Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Bucket(name: string, args: BucketArgs, opts?: CustomResourceOptions);@overload
def Bucket(resource_name: str,
args: BucketArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Bucket(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_id: Optional[str] = None,
location: Optional[str] = None,
cmek_settings: Optional[BucketCmekSettingsArgs] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
project: Optional[str] = None)func NewBucket(ctx *Context, name string, args BucketArgs, opts ...ResourceOption) (*Bucket, error)public Bucket(string name, BucketArgs args, CustomResourceOptions? opts = null)
public Bucket(String name, BucketArgs args)
public Bucket(String name, BucketArgs args, CustomResourceOptions options)
type: gcp:observability:Bucket
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_observability_bucket" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var bucketResource = new Gcp.Observability.Bucket("bucketResource", new()
{
BucketId = "string",
Location = "string",
CmekSettings = new Gcp.Observability.Inputs.BucketCmekSettingsArgs
{
KmsKey = "string",
KmsKeyVersion = "string",
ServiceAccountId = "string",
},
Description = "string",
DisplayName = "string",
Project = "string",
});
example, err := observability.NewBucket(ctx, "bucketResource", &observability.BucketArgs{
BucketId: pulumi.String("string"),
Location: pulumi.String("string"),
CmekSettings: &observability.BucketCmekSettingsArgs{
KmsKey: pulumi.String("string"),
KmsKeyVersion: pulumi.String("string"),
ServiceAccountId: pulumi.String("string"),
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Project: pulumi.String("string"),
})
resource "gcp_observability_bucket" "bucketResource" {
lifecycle {
create_before_destroy = true
}
bucket_id = "string"
location = "string"
cmek_settings = {
kms_key = "string"
kms_key_version = "string"
service_account_id = "string"
}
description = "string"
display_name = "string"
project = "string"
}
var bucketResource = new com.pulumi.gcp.observability.Bucket("bucketResource", com.pulumi.gcp.observability.BucketArgs.builder()
.bucketId("string")
.location("string")
.cmekSettings(BucketCmekSettingsArgs.builder()
.kmsKey("string")
.kmsKeyVersion("string")
.serviceAccountId("string")
.build())
.description("string")
.displayName("string")
.project("string")
.build());
bucket_resource = gcp.observability.Bucket("bucketResource",
bucket_id="string",
location="string",
cmek_settings={
"kms_key": "string",
"kms_key_version": "string",
"service_account_id": "string",
},
description="string",
display_name="string",
project="string")
const bucketResource = new gcp.observability.Bucket("bucketResource", {
bucketId: "string",
location: "string",
cmekSettings: {
kmsKey: "string",
kmsKeyVersion: "string",
serviceAccountId: "string",
},
description: "string",
displayName: "string",
project: "string",
});
type: gcp:observability:Bucket
properties:
bucketId: string
cmekSettings:
kmsKey: string
kmsKeyVersion: string
serviceAccountId: string
description: string
displayName: string
location: string
project: string
Bucket Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Bucket resource accepts the following input properties:
- Bucket
Id string - A client-assigned identifier for the bucket.
- Location string
- The location of the bucket.
- Cmek
Settings BucketCmek Settings - Settings for configuring CMEK for a bucket. Structure is documented below.
- Description string
- Description of the bucket.
- Display
Name string - User friendly display name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Bucket
Id string - A client-assigned identifier for the bucket.
- Location string
- The location of the bucket.
- Cmek
Settings BucketCmek Settings Args - Settings for configuring CMEK for a bucket. Structure is documented below.
- Description string
- Description of the bucket.
- Display
Name string - User friendly display name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bucket_
id string - A client-assigned identifier for the bucket.
- location string
- The location of the bucket.
- cmek_
settings object - Settings for configuring CMEK for a bucket. Structure is documented below.
- description string
- Description of the bucket.
- display_
name string - User friendly display name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bucket
Id String - A client-assigned identifier for the bucket.
- location String
- The location of the bucket.
- cmek
Settings BucketCmek Settings - Settings for configuring CMEK for a bucket. Structure is documented below.
- description String
- Description of the bucket.
- display
Name String - User friendly display name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bucket
Id string - A client-assigned identifier for the bucket.
- location string
- The location of the bucket.
- cmek
Settings BucketCmek Settings - Settings for configuring CMEK for a bucket. Structure is documented below.
- description string
- Description of the bucket.
- display
Name string - User friendly display name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bucket_
id str - A client-assigned identifier for the bucket.
- location str
- The location of the bucket.
- cmek_
settings BucketCmek Settings Args - Settings for configuring CMEK for a bucket. Structure is documented below.
- description str
- Description of the bucket.
- display_
name str - User friendly display name.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bucket
Id String - A client-assigned identifier for the bucket.
- location String
- The location of the bucket.
- cmek
Settings Property Map - Settings for configuring CMEK for a bucket. Structure is documented below.
- description String
- Description of the bucket.
- display
Name String - User friendly display name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Bucket resource produces the following output properties:
- Create
Time string - Output only. Create timestamp.
- Delete
Time string - Output only. Delete timestamp.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- Purge
Time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- Update
Time string - Output only. Update timestamp.
- Create
Time string - Output only. Create timestamp.
- Delete
Time string - Output only. Delete timestamp.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- Purge
Time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- Update
Time string - Output only. Update timestamp.
- create_
time string - Output only. Create timestamp.
- delete_
time string - Output only. Delete timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- purge_
time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update_
time string - Output only. Update timestamp.
- create
Time String - Output only. Create timestamp.
- delete
Time String - Output only. Delete timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- purge
Time String - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update
Time String - Output only. Update timestamp.
- create
Time string - Output only. Create timestamp.
- delete
Time string - Output only. Delete timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- purge
Time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update
Time string - Output only. Update timestamp.
- create_
time str - Output only. Create timestamp.
- delete_
time str - Output only. Delete timestamp.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- purge_
time str - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update_
time str - Output only. Update timestamp.
- create
Time String - Output only. Create timestamp.
- delete
Time String - Output only. Delete timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- purge
Time String - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update
Time String - Output only. Update timestamp.
Look up Existing Bucket Resource
Get an existing Bucket resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BucketState, opts?: CustomResourceOptions): Bucket@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_id: Optional[str] = None,
cmek_settings: Optional[BucketCmekSettingsArgs] = None,
create_time: Optional[str] = None,
delete_time: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
purge_time: Optional[str] = None,
update_time: Optional[str] = None) -> Bucketfunc GetBucket(ctx *Context, name string, id IDInput, state *BucketState, opts ...ResourceOption) (*Bucket, error)public static Bucket Get(string name, Input<string> id, BucketState? state, CustomResourceOptions? opts = null)public static Bucket get(String name, Output<String> id, BucketState state, CustomResourceOptions options)resources: _: type: gcp:observability:Bucket get: id: ${id}import {
to = gcp_observability_bucket.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket
Id string - A client-assigned identifier for the bucket.
- Cmek
Settings BucketCmek Settings - Settings for configuring CMEK for a bucket. Structure is documented below.
- Create
Time string - Output only. Create timestamp.
- Delete
Time string - Output only. Delete timestamp.
- Description string
- Description of the bucket.
- Display
Name string - User friendly display name.
- Location string
- The location of the bucket.
- Name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Purge
Time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- Update
Time string - Output only. Update timestamp.
- Bucket
Id string - A client-assigned identifier for the bucket.
- Cmek
Settings BucketCmek Settings Args - Settings for configuring CMEK for a bucket. Structure is documented below.
- Create
Time string - Output only. Create timestamp.
- Delete
Time string - Output only. Delete timestamp.
- Description string
- Description of the bucket.
- Display
Name string - User friendly display name.
- Location string
- The location of the bucket.
- Name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Purge
Time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- Update
Time string - Output only. Update timestamp.
- bucket_
id string - A client-assigned identifier for the bucket.
- cmek_
settings object - Settings for configuring CMEK for a bucket. Structure is documented below.
- create_
time string - Output only. Create timestamp.
- delete_
time string - Output only. Delete timestamp.
- description string
- Description of the bucket.
- display_
name string - User friendly display name.
- location string
- The location of the bucket.
- name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purge_
time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update_
time string - Output only. Update timestamp.
- bucket
Id String - A client-assigned identifier for the bucket.
- cmek
Settings BucketCmek Settings - Settings for configuring CMEK for a bucket. Structure is documented below.
- create
Time String - Output only. Create timestamp.
- delete
Time String - Output only. Delete timestamp.
- description String
- Description of the bucket.
- display
Name String - User friendly display name.
- location String
- The location of the bucket.
- name String
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purge
Time String - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update
Time String - Output only. Update timestamp.
- bucket
Id string - A client-assigned identifier for the bucket.
- cmek
Settings BucketCmek Settings - Settings for configuring CMEK for a bucket. Structure is documented below.
- create
Time string - Output only. Create timestamp.
- delete
Time string - Output only. Delete timestamp.
- description string
- Description of the bucket.
- display
Name string - User friendly display name.
- location string
- The location of the bucket.
- name string
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purge
Time string - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update
Time string - Output only. Update timestamp.
- bucket_
id str - A client-assigned identifier for the bucket.
- cmek_
settings BucketCmek Settings Args - Settings for configuring CMEK for a bucket. Structure is documented below.
- create_
time str - Output only. Create timestamp.
- delete_
time str - Output only. Delete timestamp.
- description str
- Description of the bucket.
- display_
name str - User friendly display name.
- location str
- The location of the bucket.
- name str
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purge_
time str - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update_
time str - Output only. Update timestamp.
- bucket
Id String - A client-assigned identifier for the bucket.
- cmek
Settings Property Map - Settings for configuring CMEK for a bucket. Structure is documented below.
- create
Time String - Output only. Create timestamp.
- delete
Time String - Output only. Delete timestamp.
- description String
- Description of the bucket.
- display
Name String - User friendly display name.
- location String
- The location of the bucket.
- name String
- Identifier. Name of the bucket. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purge
Time String - Output only. Timestamp when the bucket in soft-deleted state is purged.
- update
Time String - Output only. Update timestamp.
Supporting Types
BucketCmekSettings, BucketCmekSettingsArgs
- Kms
Key string - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- Kms
Key stringVersion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- Service
Account stringId - (Output) The service account used to access the key.
- Kms
Key string - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- Kms
Key stringVersion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- Service
Account stringId - (Output) The service account used to access the key.
- kms_
key string - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- kms_
key_ stringversion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- service_
account_ stringid - (Output) The service account used to access the key.
- kms
Key String - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- kms
Key StringVersion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- service
Account StringId - (Output) The service account used to access the key.
- kms
Key string - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- kms
Key stringVersion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- service
Account stringId - (Output) The service account used to access the key.
- kms_
key str - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- kms_
key_ strversion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- service_
account_ strid - (Output) The service account used to access the key.
- kms
Key String - The resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]
- kms
Key StringVersion - (Output) The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is: projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]
- service
Account StringId - (Output) The service account used to access the key.
Import
Bucket can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}}{{project}}/{{location}}/{{bucket_id}}{{location}}/{{bucket_id}}
When using the pulumi import command, Bucket can be imported using one of the formats above. For example:
$ pulumi import gcp:observability/bucket:Bucket default projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}}
$ pulumi import gcp:observability/bucket:Bucket default {{project}}/{{location}}/{{bucket_id}}
$ pulumi import gcp:observability/bucket:Bucket default {{location}}/{{bucket_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Tuesday, Oct 20, 2026 by Pulumi