Module logging

@pulumi/gcp > logging

class BillingAccountExclusion

extends CustomResource

Manages a billing account logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with Terraform.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_exclusion = new gcp.logging.BillingAccountExclusion("my-exclusion", {
    billingAccount: "ABCDEF-012345-GHIJKL",
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gce_instance AND severity <= DEBUG",
});

constructor

new BillingAccountExclusion(name: string, args: BillingAccountExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a BillingAccountExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BillingAccountExclusionState, opts?: pulumi.CustomResourceOptions): BillingAccountExclusion

Get an existing BillingAccountExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property billingAccount

public billingAccount: pulumi.Output<string>;

The billing account to create the exclusion for.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class BillingAccountSink

extends CustomResource

Manages a billing account logging sink. For more information see the official documentation and Exporting Logs in the API.

Note You must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted on the billing account to the credentials used with Terraform. IAM roles granted on a billing account are separate from the typical IAM roles granted on a project.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const log_bucket = new gcp.storage.Bucket("log-bucket", {});
const my_sink = new gcp.logging.BillingAccountSink("my-sink", {
    billingAccount: "ABCDEF-012345-GHIJKL",
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
});
const log_writer = new gcp.projects.IAMBinding("log-writer", {
    members: [my_sink.writerIdentity],
    role: "roles/storage.objectCreator",
});

constructor

new BillingAccountSink(name: string, args: BillingAccountSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a BillingAccountSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BillingAccountSinkState, opts?: pulumi.CustomResourceOptions): BillingAccountSink

Get an existing BillingAccountSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property billingAccount

public billingAccount: pulumi.Output<string>;

The billing account exported to the sink.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

class FolderExclusion

extends CustomResource

Manages a folder-level logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with Terraform.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_folder = new gcp.organizations.Folder("my-folder", {
    displayName: "My folder",
    parent: "organizations/123456",
});
const my_exclusion = new gcp.logging.FolderExclusion("my-exclusion", {
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gce_instance AND severity <= DEBUG",
    folder: my_folder.name,
});

constructor

new FolderExclusion(name: string, args: FolderExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a FolderExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FolderExclusionState, opts?: pulumi.CustomResourceOptions): FolderExclusion

Get an existing FolderExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property folder

public folder: pulumi.Output<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class FolderSink

extends CustomResource

Manages a folder-level logging sink. For more information see the official documentation and Exporting Logs in the API.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with terraform.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_folder = new gcp.organizations.Folder("my-folder", {
    displayName: "My folder",
    parent: "organizations/123456",
});
const log_bucket = new gcp.storage.Bucket("log-bucket", {});
const my_sink = new gcp.logging.FolderSink("my-sink", {
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    // Log all WARN or higher severity messages relating to instances
    filter: "resource.type = gce_instance AND severity >= WARN",
    folder: my_folder.name,
});
const log_writer = new gcp.projects.IAMBinding("log-writer", {
    members: [my_sink.writerIdentity],
    role: "roles/storage.objectCreator",
});

constructor

new FolderSink(name: string, args: FolderSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a FolderSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FolderSinkState, opts?: pulumi.CustomResourceOptions): FolderSink

Get an existing FolderSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property folder

public folder: pulumi.Output<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property includeChildren

public includeChildren: pulumi.Output<boolean | undefined>;

Whether or not to include children folders in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided folder are included.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

class Metric

extends CustomResource

Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.

To get more information about Metric, see:

Example Usage - Logging Metric Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const loggingMetric = new gcp.LoggingMetric("logging_metric", {
    bucketOptions: [{
        linearBuckets: [{
            numFiniteBuckets: 3,
            offset: 1,
            width: 1,
        }],
    }],
    filter: "resource.type=gae_app AND severity>=ERROR",
    labelExtractors: [{
        "EXTRACT(jsonPayload.request)": [{}],
        mass: [{}],
    }],
    metricDescriptor: [{
        labels: [{
            description: "amount of matter",
            key: "mass",
            valueType: "STRING",
        }],
        metricKind: "DELTA",
        valueType: "DISTRIBUTION",
    }],
    name: "my-(custom)/metric",
    valueExtractor: "EXTRACT(jsonPayload.request)",
});

constructor

new Metric(name: string, args: MetricArgs, opts?: pulumi.CustomResourceOptions)

Create a Metric resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MetricState, opts?: pulumi.CustomResourceOptions): Metric

Get an existing Metric resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bucketOptions

public bucketOptions: pulumi.Output<{
    explicit: undefined | {
        bounds: string[];
    };
    exponentialBuckets: undefined | {
        growthFactor: undefined | number;
        numFiniteBuckets: undefined | number;
        scale: undefined | number;
    };
    linearBuckets: undefined | {
        numFiniteBuckets: undefined | number;
        offset: undefined | number;
        width: undefined | number;
    };
} | undefined>;

property description

public description: pulumi.Output<string | undefined>;

property filter

public filter: pulumi.Output<string>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labelExtractors

public labelExtractors: pulumi.Output<{[key: string]: string} | undefined>;

property metricDescriptor

public metricDescriptor: pulumi.Output<{
    labels: {
        description: undefined | string;
        key: string;
        valueType: undefined | string;
    }[];
    metricKind: string;
    valueType: string;
}>;

property name

public name: pulumi.Output<string>;

property project

public project: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property valueExtractor

public valueExtractor: pulumi.Output<string | undefined>;

class OrganizationExclusion

extends CustomResource

Manages an organization-level logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with Terraform.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_exclusion = new gcp.logging.OrganizationExclusion("my-exclusion", {
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gce_instance AND severity <= DEBUG",
    orgId: "123456789",
});

constructor

new OrganizationExclusion(name: string, args: OrganizationExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a OrganizationExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationExclusionState, opts?: pulumi.CustomResourceOptions): OrganizationExclusion

Get an existing OrganizationExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property orgId

public orgId: pulumi.Output<string>;

The organization to create the exclusion in.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class OrganizationSink

extends CustomResource

Manages a organization-level logging sink. For more information see the official documentation and Exporting Logs in the API.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with terraform.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const log_bucket = new gcp.storage.Bucket("log-bucket", {});
const my_sink = new gcp.logging.OrganizationSink("my-sink", {
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    // Log all WARN or higher severity messages relating to instances
    filter: "resource.type = gce_instance AND severity >= WARN",
    orgId: "123456789",
});
const log_writer = new gcp.projects.IAMBinding("log-writer", {
    members: [my_sink.writerIdentity],
    role: "roles/storage.objectCreator",
});

constructor

new OrganizationSink(name: string, args: OrganizationSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a OrganizationSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationSinkState, opts?: pulumi.CustomResourceOptions): OrganizationSink

Get an existing OrganizationSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property includeChildren

public includeChildren: pulumi.Output<boolean | undefined>;

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property orgId

public orgId: pulumi.Output<string>;

The numeric ID of the organization to be exported to the sink.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

class ProjectExclusion

extends CustomResource

Manages a project-level logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with Terraform.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_exclusion = new gcp.logging.ProjectExclusion("my-exclusion", {
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gce_instance AND severity <= DEBUG",
});

constructor

new ProjectExclusion(name: string, args: ProjectExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectExclusionState, opts?: pulumi.CustomResourceOptions): ProjectExclusion

Get an existing ProjectExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property project

public project: pulumi.Output<string>;

The project to create the exclusion in. If omitted, the project associated with the provider is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class ProjectSink

extends CustomResource

Manages a project-level logging sink. For more information see the official documentation, Exporting Logs in the API and API.

Note: You must have granted the “Logs Configuration Writer” IAM role (roles/logging.configWriter) to the credentials used with terraform.

Note You must enable the Cloud Resource Manager API

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_sink = new gcp.logging.ProjectSink("my-sink", {
    // Can export to pubsub, cloud storage, or bigquery
    destination: "pubsub.googleapis.com/projects/my-project/topics/instance-activity",
    // Log all WARN or higher severity messages relating to instances
    filter: "resource.type = gce_instance AND severity >= WARN",
    // Use a unique writer (creates a unique service account used for writing)
    uniqueWriterIdentity: true,
});

A more complete example follows: this creates a compute instance, as well as a log sink that logs all activity to a cloud storage bucket. Because we are using unique_writer_identity, we must grant it access to the bucket. Note that this grant requires the “Project IAM Admin” IAM role (roles/resourcemanager.projectIamAdmin) granted to the credentials used with terraform.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

// Our logged compute instance
const my_logged_instance = new gcp.compute.Instance("my-logged-instance", {
    bootDisk: {
        initializeParams: {
            image: "debian-cloud/debian-9",
        },
    },
    machineType: "n1-standard-1",
    networkInterfaces: [{
        accessConfigs: [{}],
        network: "default",
    }],
    zone: "us-central1-a",
});
// A bucket to store logs in
const log_bucket = new gcp.storage.Bucket("log-bucket", {});
// Our sink; this logs all activity related to our "my-logged-instance" instance
const instance_sink = new gcp.logging.ProjectSink("instance-sink", {
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    filter: pulumi.interpolate`resource.type = gce_instance AND resource.labels.instance_id = "${my_logged_instance.instanceId}"`,
    uniqueWriterIdentity: true,
});
// Because our sink uses a unique_writer, we must grant that writer access to the bucket.
const log_writer = new gcp.projects.IAMBinding("log-writer", {
    members: [instance_sink.writerIdentity],
    role: "roles/storage.objectCreator",
});

constructor

new ProjectSink(name: string, args: ProjectSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectSinkState, opts?: pulumi.CustomResourceOptions): ProjectSink

Get an existing ProjectSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property project

public project: pulumi.Output<string>;

The ID of the project to create the sink in. If omitted, the project associated with the provider is used.

property uniqueWriterIdentity

public uniqueWriterIdentity: pulumi.Output<boolean | undefined>;

Whether or not to create a unique identity associated with this sink. If false (the default), then the writer_identity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set unique_writer_identity to true.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface BillingAccountExclusionArgs

The set of arguments for constructing a BillingAccountExclusion resource.

property billingAccount

billingAccount: pulumi.Input<string>;

The billing account to create the exclusion for.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface BillingAccountExclusionState

Input properties used for looking up and filtering BillingAccountExclusion resources.

property billingAccount

billingAccount?: pulumi.Input<string>;

The billing account to create the exclusion for.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface BillingAccountSinkArgs

The set of arguments for constructing a BillingAccountSink resource.

property billingAccount

billingAccount: pulumi.Input<string>;

The billing account exported to the sink.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

interface BillingAccountSinkState

Input properties used for looking up and filtering BillingAccountSink resources.

property billingAccount

billingAccount?: pulumi.Input<string>;

The billing account exported to the sink.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface FolderExclusionArgs

The set of arguments for constructing a FolderExclusion resource.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property folder

folder: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface FolderExclusionState

Input properties used for looking up and filtering FolderExclusion resources.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property folder

folder?: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface FolderSinkArgs

The set of arguments for constructing a FolderSink resource.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property folder

folder: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children folders in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided folder are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

interface FolderSinkState

Input properties used for looking up and filtering FolderSink resources.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property folder

folder?: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children folders in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided folder are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface MetricArgs

The set of arguments for constructing a Metric resource.

property bucketOptions

bucketOptions?: pulumi.Input<{
    explicit: pulumi.Input<{
        bounds: pulumi.Input<pulumi.Input<string>[]>;
    }>;
    exponentialBuckets: pulumi.Input<{
        growthFactor: pulumi.Input<number>;
        numFiniteBuckets: pulumi.Input<number>;
        scale: pulumi.Input<number>;
    }>;
    linearBuckets: pulumi.Input<{
        numFiniteBuckets: pulumi.Input<number>;
        offset: pulumi.Input<number>;
        width: pulumi.Input<number>;
    }>;
}>;

property description

description?: pulumi.Input<string>;

property filter

filter: pulumi.Input<string>;

property labelExtractors

labelExtractors?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

property metricDescriptor

metricDescriptor: pulumi.Input<{
    labels: pulumi.Input<pulumi.Input<{
        description: pulumi.Input<string>;
        key: pulumi.Input<string>;
        valueType: pulumi.Input<string>;
    }>[]>;
    metricKind: pulumi.Input<string>;
    valueType: pulumi.Input<string>;
}>;

property name

name?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

property valueExtractor

valueExtractor?: pulumi.Input<string>;

interface MetricState

Input properties used for looking up and filtering Metric resources.

property bucketOptions

bucketOptions?: pulumi.Input<{
    explicit: pulumi.Input<{
        bounds: pulumi.Input<pulumi.Input<string>[]>;
    }>;
    exponentialBuckets: pulumi.Input<{
        growthFactor: pulumi.Input<number>;
        numFiniteBuckets: pulumi.Input<number>;
        scale: pulumi.Input<number>;
    }>;
    linearBuckets: pulumi.Input<{
        numFiniteBuckets: pulumi.Input<number>;
        offset: pulumi.Input<number>;
        width: pulumi.Input<number>;
    }>;
}>;

property description

description?: pulumi.Input<string>;

property filter

filter?: pulumi.Input<string>;

property labelExtractors

labelExtractors?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

property metricDescriptor

metricDescriptor?: pulumi.Input<{
    labels: pulumi.Input<pulumi.Input<{
        description: pulumi.Input<string>;
        key: pulumi.Input<string>;
        valueType: pulumi.Input<string>;
    }>[]>;
    metricKind: pulumi.Input<string>;
    valueType: pulumi.Input<string>;
}>;

property name

name?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

property valueExtractor

valueExtractor?: pulumi.Input<string>;

interface OrganizationExclusionArgs

The set of arguments for constructing a OrganizationExclusion resource.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property orgId

orgId: pulumi.Input<string>;

The organization to create the exclusion in.

interface OrganizationExclusionState

Input properties used for looking up and filtering OrganizationExclusion resources.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property orgId

orgId?: pulumi.Input<string>;

The organization to create the exclusion in.

interface OrganizationSinkArgs

The set of arguments for constructing a OrganizationSink resource.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property orgId

orgId: pulumi.Input<string>;

The numeric ID of the organization to be exported to the sink.

interface OrganizationSinkState

Input properties used for looking up and filtering OrganizationSink resources.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property orgId

orgId?: pulumi.Input<string>;

The numeric ID of the organization to be exported to the sink.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface ProjectExclusionArgs

The set of arguments for constructing a ProjectExclusion resource.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property project

project?: pulumi.Input<string>;

The project to create the exclusion in. If omitted, the project associated with the provider is used.

interface ProjectExclusionState

Input properties used for looking up and filtering ProjectExclusion resources.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property project

project?: pulumi.Input<string>;

The project to create the exclusion in. If omitted, the project associated with the provider is used.

interface ProjectSinkArgs

The set of arguments for constructing a ProjectSink resource.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property project

project?: pulumi.Input<string>;

The ID of the project to create the sink in. If omitted, the project associated with the provider is used.

property uniqueWriterIdentity

uniqueWriterIdentity?: pulumi.Input<boolean>;

Whether or not to create a unique identity associated with this sink. If false (the default), then the writer_identity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set unique_writer_identity to true.

interface ProjectSinkState

Input properties used for looking up and filtering ProjectSink resources.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property project

project?: pulumi.Input<string>;

The ID of the project to create the sink in. If omitted, the project associated with the provider is used.

property uniqueWriterIdentity

uniqueWriterIdentity?: pulumi.Input<boolean>;

Whether or not to create a unique identity associated with this sink. If false (the default), then the writer_identity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set unique_writer_identity to true.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.