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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AviatrixSplunkLogging(name: string, args?: AviatrixSplunkLoggingArgs, opts?: CustomResourceOptions);
@overload
def AviatrixSplunkLogging(resource_name: str,
args: Optional[AviatrixSplunkLoggingArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var aviatrixSplunkLoggingResource = new Aviatrix.AviatrixSplunkLogging("aviatrixSplunkLoggingResource", new()
{
CustomInputConfig = "string",
CustomOutputConfigFile = "string",
ExcludedGateways = new[]
{
"string",
},
Port = 0,
Server = "string",
});
example, err := aviatrix.NewAviatrixSplunkLogging(ctx, "aviatrixSplunkLoggingResource", &aviatrix.AviatrixSplunkLoggingArgs{
CustomInputConfig: pulumi.String("string"),
CustomOutputConfigFile: pulumi.String("string"),
ExcludedGateways: pulumi.StringArray{
pulumi.String("string"),
},
Port: pulumi.Int(0),
Server: pulumi.String("string"),
})
var aviatrixSplunkLoggingResource = new AviatrixSplunkLogging("aviatrixSplunkLoggingResource", AviatrixSplunkLoggingArgs.builder()
.customInputConfig("string")
.customOutputConfigFile("string")
.excludedGateways("string")
.port(0)
.server("string")
.build());
aviatrix_splunk_logging_resource = aviatrix.AviatrixSplunkLogging("aviatrixSplunkLoggingResource",
custom_input_config="string",
custom_output_config_file="string",
excluded_gateways=["string"],
port=0,
server="string")
const aviatrixSplunkLoggingResource = new aviatrix.AviatrixSplunkLogging("aviatrixSplunkLoggingResource", {
customInputConfig: "string",
customOutputConfigFile: "string",
excludedGateways: ["string"],
port: 0,
server: "string",
});
type: aviatrix:AviatrixSplunkLogging
properties:
customInputConfig: string
customOutputConfigFile: string
excludedGateways:
- string
port: 0
server: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AviatrixSplunkLogging resource accepts the following input properties:
- Custom
Input stringConfig - Custom configuration.
- Custom
Output stringConfig File - Configuration file. Use the
filebase64
function to read from a file. - Excluded
Gateways List<string> - List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
- Port int
- Port number.
- Server string
- Server IP.
- Custom
Input stringConfig - Custom configuration.
- Custom
Output stringConfig File - Configuration file. Use the
filebase64
function to read from a file. - Excluded
Gateways []string - List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
- Port int
- Port number.
- Server string
- Server IP.
- custom
Input StringConfig - Custom configuration.
- custom
Output StringConfig File - Configuration file. Use the
filebase64
function to read from a file. - excluded
Gateways List<String> - List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
- port Integer
- Port number.
- server String
- Server IP.
- custom
Input stringConfig - Custom configuration.
- custom
Output stringConfig File - Configuration file. Use the
filebase64
function to read from a file. - excluded
Gateways 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_ strconfig - Custom configuration.
- custom_
output_ strconfig_ file - 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.
- custom
Input StringConfig - Custom configuration.
- custom
Output StringConfig File - Configuration file. Use the
filebase64
function to read from a file. - excluded
Gateways 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:
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.
- Custom
Input stringConfig - Custom configuration.
- Custom
Output stringConfig File - Configuration file. Use the
filebase64
function to read from a file. - Excluded
Gateways 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.
- Custom
Input stringConfig - Custom configuration.
- Custom
Output stringConfig File - Configuration file. Use the
filebase64
function to read from a file. - Excluded
Gateways []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.
- custom
Input StringConfig - Custom configuration.
- custom
Output StringConfig File - Configuration file. Use the
filebase64
function to read from a file. - excluded
Gateways 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.
- custom
Input stringConfig - Custom configuration.
- custom
Output stringConfig File - Configuration file. Use the
filebase64
function to read from a file. - excluded
Gateways 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_ strconfig - Custom configuration.
- custom_
output_ strconfig_ file - 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.
- custom
Input StringConfig - Custom configuration.
- custom
Output StringConfig File - Configuration file. Use the
filebase64
function to read from a file. - excluded
Gateways 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- aviatrix astipkovits/pulumi-aviatrix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aviatrix
Terraform Provider.