published on Wednesday, Apr 1, 2026 by Pulumi
published on Wednesday, Apr 1, 2026 by Pulumi
Manages Cloud Observability settings for a project.
Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.
Example Usage
Observability Project Settings Basic Global
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumiverse/time";
const project = new gcp.organizations.Project("project", {
projectId: "tf-test_79411",
name: "tf-test_2234",
orgId: "123456789",
deletionPolicy: "DELETE",
});
const observabilityApi = new gcp.projects.Service("observability_api", {
project: project.projectId,
service: "observability.googleapis.com",
disableOnDestroy: false,
});
// Wait for the project to be created and recognized by the Observability API
const waitForSettingsPropagation = new time.Sleep("wait_for_settings_propagation", {createDuration: "90s"}, {
dependsOn: [observabilityApi],
});
const primaryGlobal = new gcp.observability.ProjectSettings("primary_global", {
location: "global",
project: project.projectId,
defaultStorageLocation: "eu",
}, {
dependsOn: [waitForSettingsPropagation],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
project = gcp.organizations.Project("project",
project_id="tf-test_79411",
name="tf-test_2234",
org_id="123456789",
deletion_policy="DELETE")
observability_api = gcp.projects.Service("observability_api",
project=project.project_id,
service="observability.googleapis.com",
disable_on_destroy=False)
# Wait for the project to be created and recognized by the Observability API
wait_for_settings_propagation = time.Sleep("wait_for_settings_propagation", create_duration="90s",
opts = pulumi.ResourceOptions(depends_on=[observability_api]))
primary_global = gcp.observability.ProjectSettings("primary_global",
location="global",
project=project.project_id,
default_storage_location="eu",
opts = pulumi.ResourceOptions(depends_on=[wait_for_settings_propagation]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/observability"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/projects"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-time/sdk/go/time"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
ProjectId: pulumi.String("tf-test_79411"),
Name: pulumi.String("tf-test_2234"),
OrgId: pulumi.String("123456789"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
observabilityApi, err := projects.NewService(ctx, "observability_api", &projects.ServiceArgs{
Project: project.ProjectId,
Service: pulumi.String("observability.googleapis.com"),
DisableOnDestroy: pulumi.Bool(false),
})
if err != nil {
return err
}
// Wait for the project to be created and recognized by the Observability API
waitForSettingsPropagation, err := time.NewSleep(ctx, "wait_for_settings_propagation", &time.SleepArgs{
CreateDuration: pulumi.String("90s"),
}, pulumi.DependsOn([]pulumi.Resource{
observabilityApi,
}))
if err != nil {
return err
}
_, err = observability.NewProjectSettings(ctx, "primary_global", &observability.ProjectSettingsArgs{
Location: pulumi.String("global"),
Project: project.ProjectId,
DefaultStorageLocation: pulumi.String("eu"),
}, pulumi.DependsOn([]pulumi.Resource{
waitForSettingsPropagation,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;
return await Deployment.RunAsync(() =>
{
var project = new Gcp.Organizations.Project("project", new()
{
ProjectId = "tf-test_79411",
Name = "tf-test_2234",
OrgId = "123456789",
DeletionPolicy = "DELETE",
});
var observabilityApi = new Gcp.Projects.Service("observability_api", new()
{
Project = project.ProjectId,
ServiceName = "observability.googleapis.com",
DisableOnDestroy = false,
});
// Wait for the project to be created and recognized by the Observability API
var waitForSettingsPropagation = new Time.Sleep("wait_for_settings_propagation", new()
{
CreateDuration = "90s",
}, new CustomResourceOptions
{
DependsOn =
{
observabilityApi,
},
});
var primaryGlobal = new Gcp.Observability.ProjectSettings("primary_global", new()
{
Location = "global",
Project = project.ProjectId,
DefaultStorageLocation = "eu",
}, new CustomResourceOptions
{
DependsOn =
{
waitForSettingsPropagation,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.observability.ProjectSettings;
import com.pulumi.gcp.observability.ProjectSettingsArgs;
import com.pulumi.resources.CustomResourceOptions;
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 project = new Project("project", ProjectArgs.builder()
.projectId("tf-test_79411")
.name("tf-test_2234")
.orgId("123456789")
.deletionPolicy("DELETE")
.build());
var observabilityApi = new Service("observabilityApi", ServiceArgs.builder()
.project(project.projectId())
.service("observability.googleapis.com")
.disableOnDestroy(false)
.build());
// Wait for the project to be created and recognized by the Observability API
var waitForSettingsPropagation = new Sleep("waitForSettingsPropagation", SleepArgs.builder()
.createDuration("90s")
.build(), CustomResourceOptions.builder()
.dependsOn(observabilityApi)
.build());
var primaryGlobal = new ProjectSettings("primaryGlobal", ProjectSettingsArgs.builder()
.location("global")
.project(project.projectId())
.defaultStorageLocation("eu")
.build(), CustomResourceOptions.builder()
.dependsOn(waitForSettingsPropagation)
.build());
}
}
resources:
project:
type: gcp:organizations:Project
properties:
projectId: tf-test_79411
name: tf-test_2234
orgId: '123456789'
deletionPolicy: DELETE
observabilityApi:
type: gcp:projects:Service
name: observability_api
properties:
project: ${project.projectId}
service: observability.googleapis.com
disableOnDestroy: false
# Wait for the project to be created and recognized by the Observability API
waitForSettingsPropagation:
type: time:Sleep
name: wait_for_settings_propagation
properties:
createDuration: 90s
options:
dependsOn:
- ${observabilityApi}
primaryGlobal:
type: gcp:observability:ProjectSettings
name: primary_global
properties:
location: global
project: ${project.projectId}
defaultStorageLocation: eu
options:
dependsOn:
- ${waitForSettingsPropagation}
Create ProjectSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectSettings(name: string, args: ProjectSettingsArgs, opts?: CustomResourceOptions);@overload
def ProjectSettings(resource_name: str,
args: ProjectSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
default_storage_location: Optional[str] = None,
kms_key_name: Optional[str] = None,
project: Optional[str] = None)func NewProjectSettings(ctx *Context, name string, args ProjectSettingsArgs, opts ...ResourceOption) (*ProjectSettings, error)public ProjectSettings(string name, ProjectSettingsArgs args, CustomResourceOptions? opts = null)
public ProjectSettings(String name, ProjectSettingsArgs args)
public ProjectSettings(String name, ProjectSettingsArgs args, CustomResourceOptions options)
type: gcp:observability:ProjectSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectSettingsArgs
- 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 ProjectSettingsArgs
- 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 ProjectSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectSettingsArgs
- 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 projectSettingsResource = new Gcp.Observability.ProjectSettings("projectSettingsResource", new()
{
Location = "string",
DefaultStorageLocation = "string",
KmsKeyName = "string",
Project = "string",
});
example, err := observability.NewProjectSettings(ctx, "projectSettingsResource", &observability.ProjectSettingsArgs{
Location: pulumi.String("string"),
DefaultStorageLocation: pulumi.String("string"),
KmsKeyName: pulumi.String("string"),
Project: pulumi.String("string"),
})
var projectSettingsResource = new ProjectSettings("projectSettingsResource", ProjectSettingsArgs.builder()
.location("string")
.defaultStorageLocation("string")
.kmsKeyName("string")
.project("string")
.build());
project_settings_resource = gcp.observability.ProjectSettings("projectSettingsResource",
location="string",
default_storage_location="string",
kms_key_name="string",
project="string")
const projectSettingsResource = new gcp.observability.ProjectSettings("projectSettingsResource", {
location: "string",
defaultStorageLocation: "string",
kmsKeyName: "string",
project: "string",
});
type: gcp:observability:ProjectSettings
properties:
defaultStorageLocation: string
kmsKeyName: string
location: string
project: string
ProjectSettings 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 ProjectSettings resource accepts the following input properties:
- Location string
- The location of the settings.
- Default
Storage stringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- Kms
Key stringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- The location of the settings.
- Default
Storage stringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- Kms
Key stringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location of the settings.
- default
Storage StringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms
Key StringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- The location of the settings.
- default
Storage stringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms
Key stringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- The location of the settings.
- default_
storage_ strlocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms_
key_ strname - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location of the settings.
- default
Storage StringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms
Key StringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- 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 ProjectSettings resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The resource name of the settings.
- Service
Account stringId - The service account used by Cloud Observability for this project.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The resource name of the settings.
- Service
Account stringId - The service account used by Cloud Observability for this project.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The resource name of the settings.
- service
Account StringId - The service account used by Cloud Observability for this project.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The resource name of the settings.
- service
Account stringId - The service account used by Cloud Observability for this project.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The resource name of the settings.
- service_
account_ strid - The service account used by Cloud Observability for this project.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The resource name of the settings.
- service
Account StringId - The service account used by Cloud Observability for this project.
Look up Existing ProjectSettings Resource
Get an existing ProjectSettings 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?: ProjectSettingsState, opts?: CustomResourceOptions): ProjectSettings@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
default_storage_location: Optional[str] = None,
kms_key_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
service_account_id: Optional[str] = None) -> ProjectSettingsfunc GetProjectSettings(ctx *Context, name string, id IDInput, state *ProjectSettingsState, opts ...ResourceOption) (*ProjectSettings, error)public static ProjectSettings Get(string name, Input<string> id, ProjectSettingsState? state, CustomResourceOptions? opts = null)public static ProjectSettings get(String name, Output<String> id, ProjectSettingsState state, CustomResourceOptions options)resources: _: type: gcp:observability:ProjectSettings get: 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.
- Default
Storage stringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- Kms
Key stringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- Location string
- The location of the settings.
- Name string
- The resource name of the settings.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Service
Account stringId - The service account used by Cloud Observability for this project.
- Default
Storage stringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- Kms
Key stringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- Location string
- The location of the settings.
- Name string
- The resource name of the settings.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Service
Account stringId - The service account used by Cloud Observability for this project.
- default
Storage StringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms
Key StringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- location String
- The location of the settings.
- name String
- The resource name of the settings.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service
Account StringId - The service account used by Cloud Observability for this project.
- default
Storage stringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms
Key stringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- location string
- The location of the settings.
- name string
- The resource name of the settings.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service
Account stringId - The service account used by Cloud Observability for this project.
- default_
storage_ strlocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms_
key_ strname - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- location str
- The location of the settings.
- name str
- The resource name of the settings.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service_
account_ strid - The service account used by Cloud Observability for this project.
- default
Storage StringLocation - The default storage location for new resources, e.g. buckets. Only valid for global location.
- kms
Key StringName - The default Cloud KMS key to use for new resources. Only valid for regional locations.
- location String
- The location of the settings.
- name String
- The resource name of the settings.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- service
Account StringId - The service account used by Cloud Observability for this project.
Import
ProjectSettings can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/settings{{project}}/{{location}}{{location}}
When using the pulumi import command, ProjectSettings can be imported using one of the formats above. For example:
$ pulumi import gcp:observability/projectSettings:ProjectSettings default projects/{{project}}/locations/{{location}}/settings
$ pulumi import gcp:observability/projectSettings:ProjectSettings default {{project}}/{{location}}
$ pulumi import gcp:observability/projectSettings:ProjectSettings default {{location}}
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 Wednesday, Apr 1, 2026 by Pulumi
