published on Wednesday, Apr 1, 2026 by Pulumi
published on Wednesday, Apr 1, 2026 by Pulumi
Manages Cloud Observability settings for an organization.
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 Organization Settings Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumiverse/time";
const settingsData = gcp.observability.getOrganizationSettings({
organization: "123456789",
location: "us",
});
// Add a delay to allow the service account to propagate
const waitForSaPropagation = new time.Sleep("wait_for_sa_propagation", {createDuration: "90s"}, {
dependsOn: [settingsData],
});
const iam = new gcp.kms.CryptoKeyIAMMember("iam", {
cryptoKeyId: "example-key",
role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
member: settingsData.then(settingsData => `serviceAccount:${settingsData.serviceAccountId}`),
}, {
dependsOn: [waitForSaPropagation],
});
const primary = new gcp.observability.OrganizationSettings("primary", {
location: "us",
organization: "123456789",
kmsKeyName: "example-key",
}, {
dependsOn: [iam],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
settings_data = gcp.observability.get_organization_settings(organization="123456789",
location="us")
# Add a delay to allow the service account to propagate
wait_for_sa_propagation = time.Sleep("wait_for_sa_propagation", create_duration="90s",
opts = pulumi.ResourceOptions(depends_on=[settings_data]))
iam = gcp.kms.CryptoKeyIAMMember("iam",
crypto_key_id="example-key",
role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
member=f"serviceAccount:{settings_data.service_account_id}",
opts = pulumi.ResourceOptions(depends_on=[wait_for_sa_propagation]))
primary = gcp.observability.OrganizationSettings("primary",
location="us",
organization="123456789",
kms_key_name="example-key",
opts = pulumi.ResourceOptions(depends_on=[iam]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/kms"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/observability"
"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 {
settingsData, err := observability.LookupOrganizationSettings(ctx, &observability.LookupOrganizationSettingsArgs{
Organization: "123456789",
Location: "us",
}, nil)
if err != nil {
return err
}
// Add a delay to allow the service account to propagate
waitForSaPropagation, err := time.NewSleep(ctx, "wait_for_sa_propagation", &time.SleepArgs{
CreateDuration: pulumi.String("90s"),
}, pulumi.DependsOn([]pulumi.Resource{
settingsData,
}))
if err != nil {
return err
}
iam, err := kms.NewCryptoKeyIAMMember(ctx, "iam", &kms.CryptoKeyIAMMemberArgs{
CryptoKeyId: pulumi.String("example-key"),
Role: pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
Member: pulumi.Sprintf("serviceAccount:%v", settingsData.ServiceAccountId),
}, pulumi.DependsOn([]pulumi.Resource{
waitForSaPropagation,
}))
if err != nil {
return err
}
_, err = observability.NewOrganizationSettings(ctx, "primary", &observability.OrganizationSettingsArgs{
Location: pulumi.String("us"),
Organization: pulumi.String("123456789"),
KmsKeyName: pulumi.String("example-key"),
}, pulumi.DependsOn([]pulumi.Resource{
iam,
}))
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 settingsData = Gcp.Observability.GetOrganizationSettings.Invoke(new()
{
Organization = "123456789",
Location = "us",
});
// Add a delay to allow the service account to propagate
var waitForSaPropagation = new Time.Sleep("wait_for_sa_propagation", new()
{
CreateDuration = "90s",
}, new CustomResourceOptions
{
DependsOn =
{
settingsData,
},
});
var iam = new Gcp.Kms.CryptoKeyIAMMember("iam", new()
{
CryptoKeyId = "example-key",
Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
Member = $"serviceAccount:{settingsData.Apply(getOrganizationSettingsResult => getOrganizationSettingsResult.ServiceAccountId)}",
}, new CustomResourceOptions
{
DependsOn =
{
waitForSaPropagation,
},
});
var primary = new Gcp.Observability.OrganizationSettings("primary", new()
{
Location = "us",
Organization = "123456789",
KmsKeyName = "example-key",
}, new CustomResourceOptions
{
DependsOn =
{
iam,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.observability.ObservabilityFunctions;
import com.pulumi.gcp.observability.inputs.GetOrganizationSettingsArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMMember;
import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs;
import com.pulumi.gcp.observability.OrganizationSettings;
import com.pulumi.gcp.observability.OrganizationSettingsArgs;
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) {
final var settingsData = ObservabilityFunctions.getOrganizationSettings(GetOrganizationSettingsArgs.builder()
.organization("123456789")
.location("us")
.build());
// Add a delay to allow the service account to propagate
var waitForSaPropagation = new Sleep("waitForSaPropagation", SleepArgs.builder()
.createDuration("90s")
.build(), CustomResourceOptions.builder()
.dependsOn(settingsData)
.build());
var iam = new CryptoKeyIAMMember("iam", CryptoKeyIAMMemberArgs.builder()
.cryptoKeyId("example-key")
.role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
.member(String.format("serviceAccount:%s", settingsData.serviceAccountId()))
.build(), CustomResourceOptions.builder()
.dependsOn(waitForSaPropagation)
.build());
var primary = new OrganizationSettings("primary", OrganizationSettingsArgs.builder()
.location("us")
.organization("123456789")
.kmsKeyName("example-key")
.build(), CustomResourceOptions.builder()
.dependsOn(iam)
.build());
}
}
resources:
# Add a delay to allow the service account to propagate
waitForSaPropagation:
type: time:Sleep
name: wait_for_sa_propagation
properties:
createDuration: 90s
options:
dependsOn:
- ${settingsData}
iam:
type: gcp:kms:CryptoKeyIAMMember
properties:
cryptoKeyId: example-key
role: roles/cloudkms.cryptoKeyEncrypterDecrypter
member: serviceAccount:${settingsData.serviceAccountId}
options:
dependsOn:
- ${waitForSaPropagation}
primary:
type: gcp:observability:OrganizationSettings
properties:
location: us
organization: '123456789'
kmsKeyName: example-key
options:
dependsOn:
- ${iam}
variables:
settingsData:
fn::invoke:
function: gcp:observability:getOrganizationSettings
arguments:
organization: '123456789'
location: us
Observability Organization Settings Basic Global
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const settingsData = gcp.observability.getOrganizationSettings({
organization: "123456789",
location: "global",
});
const primaryGlobal = new gcp.observability.OrganizationSettings("primary_global", {
location: "global",
organization: "123456789",
defaultStorageLocation: "us",
});
import pulumi
import pulumi_gcp as gcp
settings_data = gcp.observability.get_organization_settings(organization="123456789",
location="global")
primary_global = gcp.observability.OrganizationSettings("primary_global",
location="global",
organization="123456789",
default_storage_location="us")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/observability"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := observability.LookupOrganizationSettings(ctx, &observability.LookupOrganizationSettingsArgs{
Organization: "123456789",
Location: "global",
}, nil)
if err != nil {
return err
}
_, err = observability.NewOrganizationSettings(ctx, "primary_global", &observability.OrganizationSettingsArgs{
Location: pulumi.String("global"),
Organization: pulumi.String("123456789"),
DefaultStorageLocation: pulumi.String("us"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var settingsData = Gcp.Observability.GetOrganizationSettings.Invoke(new()
{
Organization = "123456789",
Location = "global",
});
var primaryGlobal = new Gcp.Observability.OrganizationSettings("primary_global", new()
{
Location = "global",
Organization = "123456789",
DefaultStorageLocation = "us",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.observability.ObservabilityFunctions;
import com.pulumi.gcp.observability.inputs.GetOrganizationSettingsArgs;
import com.pulumi.gcp.observability.OrganizationSettings;
import com.pulumi.gcp.observability.OrganizationSettingsArgs;
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) {
final var settingsData = ObservabilityFunctions.getOrganizationSettings(GetOrganizationSettingsArgs.builder()
.organization("123456789")
.location("global")
.build());
var primaryGlobal = new OrganizationSettings("primaryGlobal", OrganizationSettingsArgs.builder()
.location("global")
.organization("123456789")
.defaultStorageLocation("us")
.build());
}
}
resources:
primaryGlobal:
type: gcp:observability:OrganizationSettings
name: primary_global
properties:
location: global
organization: '123456789'
defaultStorageLocation: us
variables:
settingsData:
fn::invoke:
function: gcp:observability:getOrganizationSettings
arguments:
organization: '123456789'
location: global
Create OrganizationSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrganizationSettings(name: string, args: OrganizationSettingsArgs, opts?: CustomResourceOptions);@overload
def OrganizationSettings(resource_name: str,
args: OrganizationSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrganizationSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
organization: Optional[str] = None,
default_storage_location: Optional[str] = None,
kms_key_name: Optional[str] = None)func NewOrganizationSettings(ctx *Context, name string, args OrganizationSettingsArgs, opts ...ResourceOption) (*OrganizationSettings, error)public OrganizationSettings(string name, OrganizationSettingsArgs args, CustomResourceOptions? opts = null)
public OrganizationSettings(String name, OrganizationSettingsArgs args)
public OrganizationSettings(String name, OrganizationSettingsArgs args, CustomResourceOptions options)
type: gcp:observability:OrganizationSettings
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 OrganizationSettingsArgs
- 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 OrganizationSettingsArgs
- 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 OrganizationSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrganizationSettingsArgs
- 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 gcpOrganizationSettingsResource = new Gcp.Observability.OrganizationSettings("gcpOrganizationSettingsResource", new()
{
Location = "string",
Organization = "string",
DefaultStorageLocation = "string",
KmsKeyName = "string",
});
example, err := observability.NewOrganizationSettings(ctx, "gcpOrganizationSettingsResource", &observability.OrganizationSettingsArgs{
Location: pulumi.String("string"),
Organization: pulumi.String("string"),
DefaultStorageLocation: pulumi.String("string"),
KmsKeyName: pulumi.String("string"),
})
var gcpOrganizationSettingsResource = new com.pulumi.gcp.observability.OrganizationSettings("gcpOrganizationSettingsResource", com.pulumi.gcp.observability.OrganizationSettingsArgs.builder()
.location("string")
.organization("string")
.defaultStorageLocation("string")
.kmsKeyName("string")
.build());
gcp_organization_settings_resource = gcp.observability.OrganizationSettings("gcpOrganizationSettingsResource",
location="string",
organization="string",
default_storage_location="string",
kms_key_name="string")
const gcpOrganizationSettingsResource = new gcp.observability.OrganizationSettings("gcpOrganizationSettingsResource", {
location: "string",
organization: "string",
defaultStorageLocation: "string",
kmsKeyName: "string",
});
type: gcp:observability:OrganizationSettings
properties:
defaultStorageLocation: string
kmsKeyName: string
location: string
organization: string
OrganizationSettings 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 OrganizationSettings resource accepts the following input properties:
- Location string
- The location of the settings.
- Organization string
- The organization ID.
- 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.
- Organization string
- The organization ID.
- 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.
- organization String
- The organization ID.
- 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.
- organization string
- The organization ID.
- 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 str
- The location of the settings.
- organization str
- The organization ID.
- 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 String
- The location of the settings.
- organization String
- The organization ID.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationSettings 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 organization.
- 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 organization.
- 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 organization.
- 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 organization.
- 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 organization.
- 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 organization.
Look up Existing OrganizationSettings Resource
Get an existing OrganizationSettings 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?: OrganizationSettingsState, opts?: CustomResourceOptions): OrganizationSettings@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,
organization: Optional[str] = None,
service_account_id: Optional[str] = None) -> OrganizationSettingsfunc GetOrganizationSettings(ctx *Context, name string, id IDInput, state *OrganizationSettingsState, opts ...ResourceOption) (*OrganizationSettings, error)public static OrganizationSettings Get(string name, Input<string> id, OrganizationSettingsState? state, CustomResourceOptions? opts = null)public static OrganizationSettings get(String name, Output<String> id, OrganizationSettingsState state, CustomResourceOptions options)resources: _: type: gcp:observability:OrganizationSettings 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.
- Organization string
- The organization ID.
- Service
Account stringId - The service account used by Cloud Observability for this organization.
- 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.
- Organization string
- The organization ID.
- Service
Account stringId - The service account used by Cloud Observability for this organization.
- 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.
- organization String
- The organization ID.
- service
Account StringId - The service account used by Cloud Observability for this organization.
- 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.
- organization string
- The organization ID.
- service
Account stringId - The service account used by Cloud Observability for this organization.
- 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.
- organization str
- The organization ID.
- service_
account_ strid - The service account used by Cloud Observability for this organization.
- 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.
- organization String
- The organization ID.
- service
Account StringId - The service account used by Cloud Observability for this organization.
Import
OrganizationSettings can be imported using any of these accepted formats:
organizations/{{organization}}/locations/{{location}}/settings{{organization}}/{{location}}
When using the pulumi import command, OrganizationSettings can be imported using one of the formats above. For example:
$ pulumi import gcp:observability/organizationSettings:OrganizationSettings default organizations/{{organization}}/locations/{{location}}/settings
$ pulumi import gcp:observability/organizationSettings:OrganizationSettings default {{organization}}/{{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
