FolderSink

Manages a folder-level logging sink. For more information see:

Example Usage

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var log_bucket = new Gcp.Storage.Bucket("log-bucket", new()
    {
        Location = "US",
    });

    var my_folder = new Gcp.Organizations.Folder("my-folder", new()
    {
        DisplayName = "My folder",
        Parent = "organizations/123456",
    });

    var my_sink = new Gcp.Logging.FolderSink("my-sink", new()
    {
        Description = "some explanation on what this is",
        Folder = my_folder.Name,
        Destination = log_bucket.Name.Apply(name => $"storage.googleapis.com/{name}"),
        Filter = "resource.type = gce_instance AND severity >= WARNING",
    });

    var log_writer = new Gcp.Projects.IAMBinding("log-writer", new()
    {
        Project = "your-project-id",
        Role = "roles/storage.objectCreator",
        Members = new[]
        {
            my_sink.WriterIdentity,
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/logging"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/projects"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storage.NewBucket(ctx, "log-bucket", &storage.BucketArgs{
			Location: pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		_, err = organizations.NewFolder(ctx, "my-folder", &organizations.FolderArgs{
			DisplayName: pulumi.String("My folder"),
			Parent:      pulumi.String("organizations/123456"),
		})
		if err != nil {
			return err
		}
		_, err = logging.NewFolderSink(ctx, "my-sink", &logging.FolderSinkArgs{
			Description: pulumi.String("some explanation on what this is"),
			Folder:      my_folder.Name,
			Destination: log_bucket.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("storage.googleapis.com/%v", name), nil
			}).(pulumi.StringOutput),
			Filter: pulumi.String("resource.type = gce_instance AND severity >= WARNING"),
		})
		if err != nil {
			return err
		}
		_, err = projects.NewIAMBinding(ctx, "log-writer", &projects.IAMBindingArgs{
			Project: pulumi.String("your-project-id"),
			Role:    pulumi.String("roles/storage.objectCreator"),
			Members: pulumi.StringArray{
				my_sink.WriterIdentity,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.organizations.Folder;
import com.pulumi.gcp.organizations.FolderArgs;
import com.pulumi.gcp.logging.FolderSink;
import com.pulumi.gcp.logging.FolderSinkArgs;
import com.pulumi.gcp.projects.IAMBinding;
import com.pulumi.gcp.projects.IAMBindingArgs;
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 log_bucket = new Bucket("log-bucket", BucketArgs.builder()        
            .location("US")
            .build());

        var my_folder = new Folder("my-folder", FolderArgs.builder()        
            .displayName("My folder")
            .parent("organizations/123456")
            .build());

        var my_sink = new FolderSink("my-sink", FolderSinkArgs.builder()        
            .description("some explanation on what this is")
            .folder(my_folder.name())
            .destination(log_bucket.name().applyValue(name -> String.format("storage.googleapis.com/%s", name)))
            .filter("resource.type = gce_instance AND severity >= WARNING")
            .build());

        var log_writer = new IAMBinding("log-writer", IAMBindingArgs.builder()        
            .project("your-project-id")
            .role("roles/storage.objectCreator")
            .members(my_sink.writerIdentity())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

log_bucket = gcp.storage.Bucket("log-bucket", location="US")
my_folder = gcp.organizations.Folder("my-folder",
    display_name="My folder",
    parent="organizations/123456")
my_sink = gcp.logging.FolderSink("my-sink",
    description="some explanation on what this is",
    folder=my_folder.name,
    destination=log_bucket.name.apply(lambda name: f"storage.googleapis.com/{name}"),
    filter="resource.type = gce_instance AND severity >= WARNING")
log_writer = gcp.projects.IAMBinding("log-writer",
    project="your-project-id",
    role="roles/storage.objectCreator",
    members=[my_sink.writer_identity])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const log_bucket = new gcp.storage.Bucket("log-bucket", {location: "US"});
const my_folder = new gcp.organizations.Folder("my-folder", {
    displayName: "My folder",
    parent: "organizations/123456",
});
const my_sink = new gcp.logging.FolderSink("my-sink", {
    description: "some explanation on what this is",
    folder: my_folder.name,
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    filter: "resource.type = gce_instance AND severity >= WARNING",
});
const log_writer = new gcp.projects.IAMBinding("log-writer", {
    project: "your-project-id",
    role: "roles/storage.objectCreator",
    members: [my_sink.writerIdentity],
});
resources:
  my-sink:
    type: gcp:logging:FolderSink
    properties:
      description: some explanation on what this is
      folder: ${["my-folder"].name}
      # Can export to pubsub, cloud storage, or bigquery
      destination: storage.googleapis.com/${["log-bucket"].name}
      # Log all WARN or higher severity messages relating to instances
      filter: resource.type = gce_instance AND severity >= WARNING
  log-bucket:
    type: gcp:storage:Bucket
    properties:
      location: US
  log-writer:
    type: gcp:projects:IAMBinding
    properties:
      project: your-project-id
      role: roles/storage.objectCreator
      members:
        - ${["my-sink"].writerIdentity}
  my-folder:
    type: gcp:organizations:Folder
    properties:
      displayName: My folder
      parent: organizations/123456

Create FolderSink Resource

new FolderSink(name: string, args: FolderSinkArgs, opts?: CustomResourceOptions);
@overload
def FolderSink(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               bigquery_options: Optional[FolderSinkBigqueryOptionsArgs] = None,
               description: Optional[str] = None,
               destination: Optional[str] = None,
               disabled: Optional[bool] = None,
               exclusions: Optional[Sequence[FolderSinkExclusionArgs]] = None,
               filter: Optional[str] = None,
               folder: Optional[str] = None,
               include_children: Optional[bool] = None,
               name: Optional[str] = None)
@overload
def FolderSink(resource_name: str,
               args: FolderSinkArgs,
               opts: Optional[ResourceOptions] = None)
func NewFolderSink(ctx *Context, name string, args FolderSinkArgs, opts ...ResourceOption) (*FolderSink, error)
public FolderSink(string name, FolderSinkArgs args, CustomResourceOptions? opts = null)
public FolderSink(String name, FolderSinkArgs args)
public FolderSink(String name, FolderSinkArgs args, CustomResourceOptions options)
type: gcp:logging:FolderSink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FolderSinkArgs
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 FolderSinkArgs
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 FolderSinkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FolderSinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FolderSinkArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FolderSink Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The FolderSink resource accepts the following input properties:

Destination string

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

Folder string

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

BigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

Description string

A description of this exclusion.

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Exclusions List<FolderSinkExclusionArgs>

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

Filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

IncludeChildren bool

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.

Name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

Destination string

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

Folder string

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

BigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

Description string

A description of this exclusion.

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Exclusions []FolderSinkExclusionArgs

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

Filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

IncludeChildren bool

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.

Name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

destination String

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

folder String

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

bigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

description String

A description of this exclusion.

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions List<FolderSinkExclusionArgs>

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter String

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

includeChildren 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.

name String

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

destination string

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

folder string

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

bigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

description string

A description of this exclusion.

disabled boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions FolderSinkExclusionArgs[]

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

includeChildren 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.

name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

destination str

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

folder str

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

bigquery_options FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

description str

A description of this exclusion.

disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions Sequence[FolderSinkExclusionArgs]

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter str

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

include_children bool

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.

name str

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

destination String

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

folder String

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

bigqueryOptions Property Map

Options that affect sinks exporting data to BigQuery. Structure documented below.

description String

A description of this exclusion.

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions List<Property Map>

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter String

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

includeChildren 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.

name String

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

Outputs

All input properties are implicitly available as output properties. Additionally, the FolderSink resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

WriterIdentity string

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

Id string

The provider-assigned unique ID for this managed resource.

WriterIdentity string

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

id String

The provider-assigned unique ID for this managed resource.

writerIdentity String

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

id string

The provider-assigned unique ID for this managed resource.

writerIdentity string

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

id str

The provider-assigned unique ID for this managed resource.

writer_identity str

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

id String

The provider-assigned unique ID for this managed resource.

writerIdentity String

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

Look up Existing FolderSink Resource

Get an existing FolderSink 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?: FolderSinkState, opts?: CustomResourceOptions): FolderSink
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bigquery_options: Optional[FolderSinkBigqueryOptionsArgs] = None,
        description: Optional[str] = None,
        destination: Optional[str] = None,
        disabled: Optional[bool] = None,
        exclusions: Optional[Sequence[FolderSinkExclusionArgs]] = None,
        filter: Optional[str] = None,
        folder: Optional[str] = None,
        include_children: Optional[bool] = None,
        name: Optional[str] = None,
        writer_identity: Optional[str] = None) -> FolderSink
func GetFolderSink(ctx *Context, name string, id IDInput, state *FolderSinkState, opts ...ResourceOption) (*FolderSink, error)
public static FolderSink Get(string name, Input<string> id, FolderSinkState? state, CustomResourceOptions? opts = null)
public static FolderSink get(String name, Output<String> id, FolderSinkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
BigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

Description string

A description of this exclusion.

Destination string

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

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Exclusions List<FolderSinkExclusionArgs>

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

Filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

Folder string

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

IncludeChildren bool

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.

Name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

WriterIdentity string

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

BigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

Description string

A description of this exclusion.

Destination string

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

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Exclusions []FolderSinkExclusionArgs

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

Filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

Folder string

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

IncludeChildren bool

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.

Name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

WriterIdentity string

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

bigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

description String

A description of this exclusion.

destination String

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

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions List<FolderSinkExclusionArgs>

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter String

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

folder String

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

includeChildren 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.

name String

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

writerIdentity String

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

bigqueryOptions FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

description string

A description of this exclusion.

destination string

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

disabled boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions FolderSinkExclusionArgs[]

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

folder string

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

includeChildren 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.

name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

writerIdentity string

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

bigquery_options FolderSinkBigqueryOptionsArgs

Options that affect sinks exporting data to BigQuery. Structure documented below.

description str

A description of this exclusion.

destination str

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

disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions Sequence[FolderSinkExclusionArgs]

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter str

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

folder str

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

include_children bool

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.

name str

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

writer_identity str

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

bigqueryOptions Property Map

Options that affect sinks exporting data to BigQuery. Structure documented below.

description String

A description of this exclusion.

destination String

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

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions List<Property Map>

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

filter String

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

folder String

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

includeChildren 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.

name String

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

writerIdentity String

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

Supporting Types

FolderSinkBigqueryOptions

UsePartitionedTables bool

Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

UsePartitionedTables bool

Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

usePartitionedTables Boolean

Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

usePartitionedTables boolean

Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

use_partitioned_tables bool

Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

usePartitionedTables Boolean

Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

FolderSinkExclusion

Filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

Name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

Description string

A description of this exclusion.

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

Name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

Description string

A description of this exclusion.

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

filter String

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

name String

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

description String

A description of this exclusion.

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

filter string

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

name string

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

description string

A description of this exclusion.

disabled boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

filter str

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

name str

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

description str

A description of this exclusion.

disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

filter String

An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.

name String

A client-assigned identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

description String

A description of this exclusion.

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Import

Folder-level logging sinks can be imported using this format

 $ pulumi import gcp:logging/folderSink:FolderSink my_sink folders/{{folder_id}}/sinks/{{name}}

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.