aviatrix.AviatrixSplunkLogging

Explore with Pulumi AI

The aviatrix_splunk_logging resource allows the enabling and disabling of splunk logging.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    // Enable splunk logging using server and port combination
    var testSplunkLogging = new Aviatrix.AviatrixSplunkLogging("testSplunkLogging", new()
    {
        Port = 10,
        Server = "1.2.3.4",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixSplunkLogging(ctx, "testSplunkLogging", &aviatrix.AviatrixSplunkLoggingArgs{
			Port:   pulumi.Int(10),
			Server: pulumi.String("1.2.3.4"),
		})
		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.aviatrix.AviatrixSplunkLogging;
import com.pulumi.aviatrix.AviatrixSplunkLoggingArgs;
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 testSplunkLogging = new AviatrixSplunkLogging("testSplunkLogging", AviatrixSplunkLoggingArgs.builder()        
            .port(10)
            .server("1.2.3.4")
            .build());

    }
}
import pulumi
import pulumi_aviatrix as aviatrix

# Enable splunk logging using server and port combination
test_splunk_logging = aviatrix.AviatrixSplunkLogging("testSplunkLogging",
    port=10,
    server="1.2.3.4")
import * as pulumi from "@pulumi/pulumi";
import * as aviatrix from "@pulumi/aviatrix";

// Enable splunk logging using server and port combination
const testSplunkLogging = new aviatrix.AviatrixSplunkLogging("test_splunk_logging", {
    port: 10,
    server: "1.2.3.4",
});
resources:
  # Enable splunk logging using server and port combination
  testSplunkLogging:
    type: aviatrix:AviatrixSplunkLogging
    properties:
      port: 10
      server: 1.2.3.4
using System;
using System.Collections.Generic;
using System.IO;
using Pulumi;
using Aviatrix = Pulumi.Aviatrix;

	private static string ReadFileBase64(string path) {
		return Convert.ToBase64String(Encoding.UTF8.GetBytes(File.ReadAllText(path)))
	}

return await Deployment.RunAsync(() => 
{
    // Enable splunk logging using configuration file
    var testSplunkLogging = new Aviatrix.AviatrixSplunkLogging("testSplunkLogging", new()
    {
        CustomOutputConfigFile = ReadFileBase64("/path/to/configuration.spl"),
    });

});
package main

import (
	"encoding/base64"
	"io/ioutil"

	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func filebase64OrPanic(path string) pulumi.StringPtrInput {
	if fileData, err := ioutil.ReadFile(path); err == nil {
		return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
	} else {
		panic(err.Error())
	}
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixSplunkLogging(ctx, "testSplunkLogging", &aviatrix.AviatrixSplunkLoggingArgs{
			CustomOutputConfigFile: filebase64OrPanic("/path/to/configuration.spl"),
		})
		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.aviatrix.AviatrixSplunkLogging;
import com.pulumi.aviatrix.AviatrixSplunkLoggingArgs;
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 testSplunkLogging = new AviatrixSplunkLogging("testSplunkLogging", AviatrixSplunkLoggingArgs.builder()        
            .customOutputConfigFile(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("/path/to/configuration.spl"))))
            .build());

    }
}
import pulumi
import base64
import pulumi_aviatrix as aviatrix

# Enable splunk logging using configuration file
test_splunk_logging = aviatrix.AviatrixSplunkLogging("testSplunkLogging", custom_output_config_file=(lambda path: base64.b64encode(open(path).read().encode()).decode())("/path/to/configuration.spl"))
import * as pulumi from "@pulumi/pulumi";
import * as aviatrix from "@astipkovits/aviatrix";
import * as fs from "fs";

// Enable splunk logging using configuration file
const testSplunkLogging = new aviatrix.AviatrixSplunkLogging("testSplunkLogging", {customOutputConfigFile: Buffer.from(fs.readFileSync("/path/to/configuration.spl"), 'binary').toString('base64')});

Coming soon!

Create AviatrixSplunkLogging Resource

new AviatrixSplunkLogging(name: string, args?: AviatrixSplunkLoggingArgs, opts?: CustomResourceOptions);
@overload
def AviatrixSplunkLogging(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          custom_input_config: Optional[str] = None,
                          custom_output_config_file: Optional[str] = None,
                          excluded_gateways: Optional[Sequence[str]] = None,
                          port: Optional[int] = None,
                          server: Optional[str] = None)
@overload
def AviatrixSplunkLogging(resource_name: str,
                          args: Optional[AviatrixSplunkLoggingArgs] = None,
                          opts: Optional[ResourceOptions] = None)
func NewAviatrixSplunkLogging(ctx *Context, name string, args *AviatrixSplunkLoggingArgs, opts ...ResourceOption) (*AviatrixSplunkLogging, error)
public AviatrixSplunkLogging(string name, AviatrixSplunkLoggingArgs? args = null, CustomResourceOptions? opts = null)
public AviatrixSplunkLogging(String name, AviatrixSplunkLoggingArgs args)
public AviatrixSplunkLogging(String name, AviatrixSplunkLoggingArgs args, CustomResourceOptions options)
type: aviatrix:AviatrixSplunkLogging
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

CustomInputConfig string

Custom configuration.

CustomOutputConfigFile string

Configuration file. Use the filebase64 function to read from a file.

ExcludedGateways List<string>

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

Port int

Port number.

Server string

Server IP.

CustomInputConfig string

Custom configuration.

CustomOutputConfigFile string

Configuration file. Use the filebase64 function to read from a file.

ExcludedGateways []string

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

Port int

Port number.

Server string

Server IP.

customInputConfig String

Custom configuration.

customOutputConfigFile String

Configuration file. Use the filebase64 function to read from a file.

excludedGateways List<String>

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port Integer

Port number.

server String

Server IP.

customInputConfig string

Custom configuration.

customOutputConfigFile string

Configuration file. Use the filebase64 function to read from a file.

excludedGateways string[]

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port number

Port number.

server string

Server IP.

custom_input_config str

Custom configuration.

custom_output_config_file str

Configuration file. Use the filebase64 function to read from a file.

excluded_gateways Sequence[str]

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port int

Port number.

server str

Server IP.

customInputConfig String

Custom configuration.

customOutputConfigFile String

Configuration file. Use the filebase64 function to read from a file.

excludedGateways List<String>

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port Number

Port number.

server String

Server IP.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of splunk logging.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of splunk logging.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of splunk logging.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of splunk logging.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of splunk logging.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of splunk logging.

Look up Existing AviatrixSplunkLogging Resource

Get an existing AviatrixSplunkLogging 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?: AviatrixSplunkLoggingState, opts?: CustomResourceOptions): AviatrixSplunkLogging
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        custom_input_config: Optional[str] = None,
        custom_output_config_file: Optional[str] = None,
        excluded_gateways: Optional[Sequence[str]] = None,
        port: Optional[int] = None,
        server: Optional[str] = None,
        status: Optional[str] = None) -> AviatrixSplunkLogging
func GetAviatrixSplunkLogging(ctx *Context, name string, id IDInput, state *AviatrixSplunkLoggingState, opts ...ResourceOption) (*AviatrixSplunkLogging, error)
public static AviatrixSplunkLogging Get(string name, Input<string> id, AviatrixSplunkLoggingState? state, CustomResourceOptions? opts = null)
public static AviatrixSplunkLogging get(String name, Output<String> id, AviatrixSplunkLoggingState 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:
CustomInputConfig string

Custom configuration.

CustomOutputConfigFile string

Configuration file. Use the filebase64 function to read from a file.

ExcludedGateways List<string>

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

Port int

Port number.

Server string

Server IP.

Status string

The status of splunk logging.

CustomInputConfig string

Custom configuration.

CustomOutputConfigFile string

Configuration file. Use the filebase64 function to read from a file.

ExcludedGateways []string

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

Port int

Port number.

Server string

Server IP.

Status string

The status of splunk logging.

customInputConfig String

Custom configuration.

customOutputConfigFile String

Configuration file. Use the filebase64 function to read from a file.

excludedGateways List<String>

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port Integer

Port number.

server String

Server IP.

status String

The status of splunk logging.

customInputConfig string

Custom configuration.

customOutputConfigFile string

Configuration file. Use the filebase64 function to read from a file.

excludedGateways string[]

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port number

Port number.

server string

Server IP.

status string

The status of splunk logging.

custom_input_config str

Custom configuration.

custom_output_config_file str

Configuration file. Use the filebase64 function to read from a file.

excluded_gateways Sequence[str]

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port int

Port number.

server str

Server IP.

status str

The status of splunk logging.

customInputConfig String

Custom configuration.

customOutputConfigFile String

Configuration file. Use the filebase64 function to read from a file.

excludedGateways List<String>

List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].

port Number

Port number.

server String

Server IP.

status String

The status of splunk logging.

Import

splunk_logging can be imported using splunk_logging, e.g.

 $ pulumi import aviatrix:index/aviatrixSplunkLogging:AviatrixSplunkLogging test splunk_logging

Package Details

Repository
aviatrix astipkovits/pulumi-aviatrix
License
Apache-2.0
Notes

This Pulumi package is based on the aviatrix Terraform Provider.