sumologic logo
Sumo Logic v0.14.0, May 25 23

sumologic.CloudToCloudSource

Explore with Pulumi AI

Provides a [Sumologic Cloud-to-Cloud source][1].

Supported Integrations

List of available integrations along with their corresponding JSON templates is present here

IMPORTANT: The API credentials are stored in plain-text in the state. This is a potential security issue.

Example Usage

using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;

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

    var oktaSource = new SumoLogic.CloudToCloudSource("oktaSource", new()
    {
        CollectorId = collector.Id,
        SchemaRef = 
        {
            { "type", "Okta" },
        },
        Config = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["name"] = "okta source",
            ["domain"] = "dev-xxx-admin.okta.com",
            ["collectAll"] = true,
            ["apiKey"] = "xxx",
            ["fields"] = new Dictionary<string, object?>
            {
                ["_siemForward"] = false,
            },
            ["pollingInterval"] = 30,
        }),
    });

});
package main

import (
	"encoding/json"

	"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
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"name":       "okta source",
			"domain":     "dev-xxx-admin.okta.com",
			"collectAll": true,
			"apiKey":     "xxx",
			"fields": map[string]interface{}{
				"_siemForward": false,
			},
			"pollingInterval": 30,
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = sumologic.NewCloudToCloudSource(ctx, "oktaSource", &sumologic.CloudToCloudSourceArgs{
			CollectorId: collector.ID(),
			SchemaRef: pulumi.StringMap{
				"type": pulumi.String("Okta"),
			},
			Config: pulumi.String(json0),
		})
		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.CloudToCloudSource;
import com.pulumi.sumologic.CloudToCloudSourceArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 oktaSource = new CloudToCloudSource("oktaSource", CloudToCloudSourceArgs.builder()        
            .collectorId(collector.id())
            .schemaRef(Map.of("type", "Okta"))
            .config(serializeJson(
                jsonObject(
                    jsonProperty("name", "okta source"),
                    jsonProperty("domain", "dev-xxx-admin.okta.com"),
                    jsonProperty("collectAll", true),
                    jsonProperty("apiKey", "xxx"),
                    jsonProperty("fields", jsonObject(
                        jsonProperty("_siemForward", false)
                    )),
                    jsonProperty("pollingInterval", 30)
                )))
            .build());

    }
}
import pulumi
import json
import pulumi_sumologic as sumologic

collector = sumologic.Collector("collector", description="Just testing this")
okta_source = sumologic.CloudToCloudSource("oktaSource",
    collector_id=collector.id,
    schema_ref={
        "type": "Okta",
    },
    config=json.dumps({
        "name": "okta source",
        "domain": "dev-xxx-admin.okta.com",
        "collectAll": True,
        "apiKey": "xxx",
        "fields": {
            "_siemForward": False,
        },
        "pollingInterval": 30,
    }))
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const collector = new sumologic.Collector("collector", {description: "Just testing this"});
const oktaSource = new sumologic.CloudToCloudSource("oktaSource", {
    collectorId: collector.id,
    schemaRef: {
        type: "Okta",
    },
    config: JSON.stringify({
        name: "okta source",
        domain: "dev-xxx-admin.okta.com",
        collectAll: true,
        apiKey: "xxx",
        fields: {
            _siemForward: false,
        },
        pollingInterval: 30,
    }),
});
resources:
  oktaSource:
    type: sumologic:CloudToCloudSource
    properties:
      collectorId: ${collector.id}
      schemaRef:
        type: Okta
      config:
        fn::toJSON:
          name: okta source
          domain: dev-xxx-admin.okta.com
          collectAll: true
          apiKey: xxx
          fields:
            _siemForward: false
          pollingInterval: 30
  collector:
    type: sumologic:Collector
    properties:
      description: Just testing this

Create CloudToCloudSource Resource

new CloudToCloudSource(name: string, args: CloudToCloudSourceArgs, opts?: CustomResourceOptions);
@overload
def CloudToCloudSource(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       collector_id: Optional[int] = None,
                       config: Optional[str] = None,
                       schema_ref: Optional[Mapping[str, str]] = None)
@overload
def CloudToCloudSource(resource_name: str,
                       args: CloudToCloudSourceArgs,
                       opts: Optional[ResourceOptions] = None)
func NewCloudToCloudSource(ctx *Context, name string, args CloudToCloudSourceArgs, opts ...ResourceOption) (*CloudToCloudSource, error)
public CloudToCloudSource(string name, CloudToCloudSourceArgs args, CustomResourceOptions? opts = null)
public CloudToCloudSource(String name, CloudToCloudSourceArgs args)
public CloudToCloudSource(String name, CloudToCloudSourceArgs args, CustomResourceOptions options)
type: sumologic:CloudToCloudSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

CollectorId int
Config string

This is a JSON object which contains the configuration parameters for the Source.

SchemaRef Dictionary<string, string>

Source schema details.

CollectorId int
Config string

This is a JSON object which contains the configuration parameters for the Source.

SchemaRef map[string]string

Source schema details.

collectorId Integer
config String

This is a JSON object which contains the configuration parameters for the Source.

schemaRef Map<String,String>

Source schema details.

collectorId number
config string

This is a JSON object which contains the configuration parameters for the Source.

schemaRef {[key: string]: string}

Source schema details.

collector_id int
config str

This is a JSON object which contains the configuration parameters for the Source.

schema_ref Mapping[str, str]

Source schema details.

collectorId Number
config String

This is a JSON object which contains the configuration parameters for the Source.

schemaRef Map<String>

Source schema details.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing CloudToCloudSource Resource

Get an existing CloudToCloudSource 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?: CloudToCloudSourceState, opts?: CustomResourceOptions): CloudToCloudSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        collector_id: Optional[int] = None,
        config: Optional[str] = None,
        schema_ref: Optional[Mapping[str, str]] = None) -> CloudToCloudSource
func GetCloudToCloudSource(ctx *Context, name string, id IDInput, state *CloudToCloudSourceState, opts ...ResourceOption) (*CloudToCloudSource, error)
public static CloudToCloudSource Get(string name, Input<string> id, CloudToCloudSourceState? state, CustomResourceOptions? opts = null)
public static CloudToCloudSource get(String name, Output<String> id, CloudToCloudSourceState 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:
CollectorId int
Config string

This is a JSON object which contains the configuration parameters for the Source.

SchemaRef Dictionary<string, string>

Source schema details.

CollectorId int
Config string

This is a JSON object which contains the configuration parameters for the Source.

SchemaRef map[string]string

Source schema details.

collectorId Integer
config String

This is a JSON object which contains the configuration parameters for the Source.

schemaRef Map<String,String>

Source schema details.

collectorId number
config string

This is a JSON object which contains the configuration parameters for the Source.

schemaRef {[key: string]: string}

Source schema details.

collector_id int
config str

This is a JSON object which contains the configuration parameters for the Source.

schema_ref Mapping[str, str]

Source schema details.

collectorId Number
config String

This is a JSON object which contains the configuration parameters for the Source.

schemaRef Map<String>

Source schema details.

Import

Cloud-to-Cloud sources can be imported using the collector and source IDs (collector/source), e.g.hcl

 $ pulumi import sumologic:index/cloudToCloudSource:CloudToCloudSource test 100000001/100000001

Cloud-to-Cloud sources can be imported using the collector name and source name (collectorName/sourceName), e.g.hcl

 $ pulumi import sumologic:index/cloudToCloudSource:CloudToCloudSource test my-test-collector/my-test-source

[1]https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Cloud-to-Cloud_Integration_Framework [2]https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Cloud-to-Cloud_Integration_Framework#Integrations

Package Details

Repository
Sumo Logic pulumi/pulumi-sumologic
License
Apache-2.0
Notes

This Pulumi package is based on the sumologic Terraform Provider.