UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

170 lines 6.3 kB
import * as pulumi from "@pulumi/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 * * ```typescript * 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], * }); * ``` * ### Observability Organization Settings Basic Global * * ```typescript * 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 * * 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: * * ```sh * $ pulumi import gcp:observability/organizationSettings:OrganizationSettings default organizations/{{organization}}/locations/{{location}}/settings * $ pulumi import gcp:observability/organizationSettings:OrganizationSettings default {{organization}}/{{location}} * ``` */ export declare class OrganizationSettings extends pulumi.CustomResource { /** * Get an existing OrganizationSettings resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationSettingsState, opts?: pulumi.CustomResourceOptions): OrganizationSettings; /** * Returns true if the given object is an instance of OrganizationSettings. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is OrganizationSettings; /** * The default storage location for new resources, e.g. buckets. Only valid for global location. */ readonly defaultStorageLocation: pulumi.Output<string | undefined>; /** * The default Cloud KMS key to use for new resources. Only valid for regional locations. */ readonly kmsKeyName: pulumi.Output<string | undefined>; /** * The location of the settings. */ readonly location: pulumi.Output<string>; /** * The resource name of the settings. */ readonly name: pulumi.Output<string>; /** * The organization ID. */ readonly organization: pulumi.Output<string>; /** * The service account used by Cloud Observability for this organization. */ readonly serviceAccountId: pulumi.Output<string>; /** * Create a OrganizationSettings resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: OrganizationSettingsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering OrganizationSettings resources. */ export interface OrganizationSettingsState { /** * The default storage location for new resources, e.g. buckets. Only valid for global location. */ defaultStorageLocation?: pulumi.Input<string | undefined>; /** * The default Cloud KMS key to use for new resources. Only valid for regional locations. */ kmsKeyName?: pulumi.Input<string | undefined>; /** * The location of the settings. */ location?: pulumi.Input<string | undefined>; /** * The resource name of the settings. */ name?: pulumi.Input<string | undefined>; /** * The organization ID. */ organization?: pulumi.Input<string | undefined>; /** * The service account used by Cloud Observability for this organization. */ serviceAccountId?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a OrganizationSettings resource. */ export interface OrganizationSettingsArgs { /** * The default storage location for new resources, e.g. buckets. Only valid for global location. */ defaultStorageLocation?: pulumi.Input<string | undefined>; /** * The default Cloud KMS key to use for new resources. Only valid for regional locations. */ kmsKeyName?: pulumi.Input<string | undefined>; /** * The location of the settings. */ location: pulumi.Input<string>; /** * The organization ID. */ organization: pulumi.Input<string>; } //# sourceMappingURL=organizationSettings.d.ts.map