SumoLogic

v0.10.0 published on Wednesday, Sep 21, 2022 by Pulumi

GcpSource

Provides a Sumo Logic Google Cloud Platform Source.

Note: Google no longer requires a pub/sub domain to be verified. You no longer have to set up domain verification with your GCP Source endpoint.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var collector = new SumoLogic.Collector("collector", new()
    {
        Description = "Just testing this",
    });

    var gcpSource = new SumoLogic.GcpSource("gcpSource", new()
    {
        Category = "gcp",
        CollectorId = collector.Id,
        Description = "My description",
    });

});
package main

import (
	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		collector, err := sumologic.NewCollector(ctx, "collector", &sumologic.CollectorArgs{
			Description: pulumi.String("Just testing this"),
		})
		if err != nil {
			return err
		}
		_, err = sumologic.NewGcpSource(ctx, "gcpSource", &sumologic.GcpSourceArgs{
			Category:    pulumi.String("gcp"),
			CollectorId: collector.ID(),
			Description: pulumi.String("My description"),
		})
		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.sumologic.Collector;
import com.pulumi.sumologic.CollectorArgs;
import com.pulumi.sumologic.GcpSource;
import com.pulumi.sumologic.GcpSourceArgs;
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 collector = new Collector("collector", CollectorArgs.builder()        
            .description("Just testing this")
            .build());

        var gcpSource = new GcpSource("gcpSource", GcpSourceArgs.builder()        
            .category("gcp")
            .collectorId(collector.id())
            .description("My description")
            .build());

    }
}
import pulumi
import pulumi_sumologic as sumologic

collector = sumologic.Collector("collector", description="Just testing this")
gcp_source = sumologic.GcpSource("gcpSource",
    category="gcp",
    collector_id=collector.id,
    description="My description")
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const collector = new sumologic.Collector("collector", {
    description: "Just testing this",
});
const gcpSource = new sumologic.GcpSource("gcp_source", {
    category: "gcp",
    collectorId: collector.id.apply(id => Number.parseFloat(id)),
    description: "My description",
});
resources:
  gcpSource:
    type: sumologic:GcpSource
    properties:
      category: gcp
      collectorId: ${collector.id}
      description: My description
  collector:
    type: sumologic:Collector
    properties:
      description: Just testing this

Create a GcpSource Resource

new GcpSource(name: string, args: GcpSourceArgs, opts?: CustomResourceOptions);
@overload
def GcpSource(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              authentication: Optional[GcpSourceAuthenticationArgs] = None,
              automatic_date_parsing: Optional[bool] = None,
              category: Optional[str] = None,
              collector_id: Optional[int] = None,
              content_type: Optional[str] = None,
              cutoff_relative_time: Optional[str] = None,
              cutoff_timestamp: Optional[int] = None,
              default_date_formats: Optional[Sequence[GcpSourceDefaultDateFormatArgs]] = None,
              description: Optional[str] = None,
              fields: Optional[Mapping[str, str]] = None,
              filters: Optional[Sequence[GcpSourceFilterArgs]] = None,
              force_timezone: Optional[bool] = None,
              host_name: Optional[str] = None,
              manual_prefix_regexp: Optional[str] = None,
              message_per_request: Optional[bool] = None,
              multiline_processing_enabled: Optional[bool] = None,
              name: Optional[str] = None,
              path: Optional[GcpSourcePathArgs] = None,
              timezone: Optional[str] = None,
              use_autoline_matching: Optional[bool] = None)
@overload
def GcpSource(resource_name: str,
              args: GcpSourceArgs,
              opts: Optional[ResourceOptions] = None)
func NewGcpSource(ctx *Context, name string, args GcpSourceArgs, opts ...ResourceOption) (*GcpSource, error)
public GcpSource(string name, GcpSourceArgs args, CustomResourceOptions? opts = null)
public GcpSource(String name, GcpSourceArgs args)
public GcpSource(String name, GcpSourceArgs args, CustomResourceOptions options)
type: sumologic:GcpSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

GcpSource 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 GcpSource resource accepts the following input properties:

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Url string

The HTTP endpoint to use for sending data to this source.

Id string

The provider-assigned unique ID for this managed resource.

Url string

The HTTP endpoint to use for sending data to this source.

id String

The provider-assigned unique ID for this managed resource.

url String

The HTTP endpoint to use for sending data to this source.

id string

The provider-assigned unique ID for this managed resource.

url string

The HTTP endpoint to use for sending data to this source.

id str

The provider-assigned unique ID for this managed resource.

url str

The HTTP endpoint to use for sending data to this source.

id String

The provider-assigned unique ID for this managed resource.

url String

The HTTP endpoint to use for sending data to this source.

Look up an Existing GcpSource Resource

Get an existing GcpSource 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?: GcpSourceState, opts?: CustomResourceOptions): GcpSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authentication: Optional[GcpSourceAuthenticationArgs] = None,
        automatic_date_parsing: Optional[bool] = None,
        category: Optional[str] = None,
        collector_id: Optional[int] = None,
        content_type: Optional[str] = None,
        cutoff_relative_time: Optional[str] = None,
        cutoff_timestamp: Optional[int] = None,
        default_date_formats: Optional[Sequence[GcpSourceDefaultDateFormatArgs]] = None,
        description: Optional[str] = None,
        fields: Optional[Mapping[str, str]] = None,
        filters: Optional[Sequence[GcpSourceFilterArgs]] = None,
        force_timezone: Optional[bool] = None,
        host_name: Optional[str] = None,
        manual_prefix_regexp: Optional[str] = None,
        message_per_request: Optional[bool] = None,
        multiline_processing_enabled: Optional[bool] = None,
        name: Optional[str] = None,
        path: Optional[GcpSourcePathArgs] = None,
        timezone: Optional[str] = None,
        url: Optional[str] = None,
        use_autoline_matching: Optional[bool] = None) -> GcpSource
func GetGcpSource(ctx *Context, name string, id IDInput, state *GcpSourceState, opts ...ResourceOption) (*GcpSource, error)
public static GcpSource Get(string name, Input<string> id, GcpSourceState? state, CustomResourceOptions? opts = null)
public static GcpSource get(String name, Output<String> id, GcpSourceState 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:

Supporting Types

GcpSourceAuthentication

Type string
Type string
type String
type string
type str
type String

GcpSourceDefaultDateFormat

Format string
Locator string
Format string
Locator string
format String
locator String
format string
locator string
format String
locator String

GcpSourceFilter

FilterType string
Name string
Regexp string
Mask string
FilterType string
Name string
Regexp string
Mask string
filterType String
name String
regexp String
mask String
filterType string
name string
regexp string
mask string
filterType String
name String
regexp String
mask String

GcpSourcePath

Type string
Type string
type String
type string
type str
type String

Import

Sumo Logic Google Cloud Platform sources can be imported using the collector and source IDs (collector/source), e.g.hcl

 $ pulumi import sumologic:index/gcpSource:GcpSource test 100000001/100000001

Sumo Logic Google Cloud Platform sources can be imported using the collector name and source name (collectorName/sourceName), e.g.hcl

 $ pulumi import sumologic:index/gcpSource:GcpSource test my-test-collector/my-test-source

[1]https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources [2]https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Google-Cloud-Platform-Source [3]https://cloud.google.com/pubsub/docs/push

Package Details

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

This Pulumi package is based on the sumologic Terraform Provider.