Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

DbaasLogsInput

Creates a dbaas logs input.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Lbrlabs.PulumiPackage.Ovh;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var logstash = Ovh.GetDbaasLogsInputEngine.Invoke(new()
    {
        Name = "logstash",
        Version = "7.x",
    });

    var stream = new Ovh.DbaasLogsOutputGraylogStream("stream", new()
    {
        ServiceName = "....",
        Title = "my stream",
        Description = "my graylog stream",
    });

    var input = new Ovh.DbaasLogsInput("input", new()
    {
        ServiceName = stream.ServiceName,
        Description = stream.Description,
        Title = stream.Title,
        EngineId = logstash.Apply(getDbaasLogsInputEngineResult => getDbaasLogsInputEngineResult.Id),
        StreamId = stream.Id,
        AllowedNetworks = new[]
        {
            "10.0.0.0/16",
        },
        ExposedPort = "6154",
        NbInstance = 2,
        Configuration = new Ovh.Inputs.DbaasLogsInputConfigurationArgs
        {
            Logstash = new Ovh.Inputs.DbaasLogsInputConfigurationLogstashArgs
            {
                InputSection = @"beats {
  port => 6514
  ssl => true
  ssl_certificate => ""/etc/ssl/private/server.crt""
  ssl_key => ""/etc/ssl/private/server.key""
}
",
            },
        },
    });

});
package main

import (
	"fmt"

	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		logstash, err := ovh.GetDbaasLogsInputEngine(ctx, &GetDbaasLogsInputEngineArgs{
			Name:    pulumi.StringRef("logstash"),
			Version: pulumi.StringRef("7.x"),
		}, nil)
		if err != nil {
			return err
		}
		stream, err := ovh.NewDbaasLogsOutputGraylogStream(ctx, "stream", &ovh.DbaasLogsOutputGraylogStreamArgs{
			ServiceName: pulumi.String("...."),
			Title:       pulumi.String("my stream"),
			Description: pulumi.String("my graylog stream"),
		})
		if err != nil {
			return err
		}
		_, err = ovh.NewDbaasLogsInput(ctx, "input", &ovh.DbaasLogsInputArgs{
			ServiceName: stream.ServiceName,
			Description: stream.Description,
			Title:       stream.Title,
			EngineId:    pulumi.String(logstash.Id),
			StreamId:    stream.ID(),
			AllowedNetworks: pulumi.StringArray{
				pulumi.String("10.0.0.0/16"),
			},
			ExposedPort: pulumi.String("6154"),
			NbInstance:  pulumi.Int(2),
			Configuration: &DbaasLogsInputConfigurationArgs{
				Logstash: &DbaasLogsInputConfigurationLogstashArgs{
					InputSection: pulumi.String(fmt.Sprintf(`beats {
  port => 6514
  ssl => true
  ssl_certificate => "/etc/ssl/private/server.crt"
  ssl_key => "/etc/ssl/private/server.key"
}
`)),
				},
			},
		})
		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.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetDbaasLogsInputEngineArgs;
import com.pulumi.ovh.DbaasLogsOutputGraylogStream;
import com.pulumi.ovh.DbaasLogsOutputGraylogStreamArgs;
import com.pulumi.ovh.DbaasLogsInput;
import com.pulumi.ovh.DbaasLogsInputArgs;
import com.pulumi.ovh.inputs.DbaasLogsInputConfigurationArgs;
import com.pulumi.ovh.inputs.DbaasLogsInputConfigurationLogstashArgs;
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) {
        final var logstash = OvhFunctions.getDbaasLogsInputEngine(GetDbaasLogsInputEngineArgs.builder()
            .name("logstash")
            .version("7.x")
            .build());

        var stream = new DbaasLogsOutputGraylogStream("stream", DbaasLogsOutputGraylogStreamArgs.builder()        
            .serviceName("....")
            .title("my stream")
            .description("my graylog stream")
            .build());

        var input = new DbaasLogsInput("input", DbaasLogsInputArgs.builder()        
            .serviceName(stream.serviceName())
            .description(stream.description())
            .title(stream.title())
            .engineId(logstash.applyValue(getDbaasLogsInputEngineResult -> getDbaasLogsInputEngineResult.id()))
            .streamId(stream.id())
            .allowedNetworks("10.0.0.0/16")
            .exposedPort("6154")
            .nbInstance(2)
            .configuration(DbaasLogsInputConfigurationArgs.builder()
                .logstash(DbaasLogsInputConfigurationLogstashArgs.builder()
                    .inputSection("""
beats {
  port => 6514
  ssl => true
  ssl_certificate => "/etc/ssl/private/server.crt"
  ssl_key => "/etc/ssl/private/server.key"
}
                    """)
                    .build())
                .build())
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_ovh as ovh
import pulumi_ovh as ovh

logstash = ovh.get_dbaas_logs_input_engine(name="logstash",
    version="7.x")
stream = ovh.DbaasLogsOutputGraylogStream("stream",
    service_name="....",
    title="my stream",
    description="my graylog stream")
input = ovh.DbaasLogsInput("input",
    service_name=stream.service_name,
    description=stream.description,
    title=stream.title,
    engine_id=logstash.id,
    stream_id=stream.id,
    allowed_networks=["10.0.0.0/16"],
    exposed_port="6154",
    nb_instance=2,
    configuration=ovh.DbaasLogsInputConfigurationArgs(
        logstash=ovh.DbaasLogsInputConfigurationLogstashArgs(
            input_section="""beats {
  port => 6514
  ssl => true
  ssl_certificate => "/etc/ssl/private/server.crt"
  ssl_key => "/etc/ssl/private/server.key"
}
""",
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@lbrlabs/pulumi-ovh";
import * as ovh from "@pulumi/ovh";

const logstash = ovh.getDbaasLogsInputEngine({
    name: "logstash",
    version: "7.x",
});
const stream = new ovh.DbaasLogsOutputGraylogStream("stream", {
    serviceName: "....",
    title: "my stream",
    description: "my graylog stream",
});
const input = new ovh.DbaasLogsInput("input", {
    serviceName: stream.serviceName,
    description: stream.description,
    title: stream.title,
    engineId: logstash.then(logstash => logstash.id),
    streamId: stream.id,
    allowedNetworks: ["10.0.0.0/16"],
    exposedPort: "6154",
    nbInstance: 2,
    configuration: {
        logstash: {
            inputSection: `beats {
  port => 6514
  ssl => true
  ssl_certificate => "/etc/ssl/private/server.crt"
  ssl_key => "/etc/ssl/private/server.key"
}
`,
        },
    },
});
resources:
  stream:
    type: ovh:DbaasLogsOutputGraylogStream
    properties:
      serviceName: '....'
      title: my stream
      description: my graylog stream
  input:
    type: ovh:DbaasLogsInput
    properties:
      serviceName: ${stream.serviceName}
      description: ${stream.description}
      title: ${stream.title}
      engineId: ${logstash.id}
      streamId: ${stream.id}
      allowedNetworks:
        - 10.0.0.0/16
      exposedPort: 6154
      nbInstance: 2
      configuration:
        logstash:
          inputSection: |
            beats {
              port => 6514
              ssl => true
              ssl_certificate => "/etc/ssl/private/server.crt"
              ssl_key => "/etc/ssl/private/server.key"
            }            
variables:
  logstash:
    Fn::Invoke:
      Function: ovh:getDbaasLogsInputEngine
      Arguments:
        name: logstash
        version: 7.x

Create a DbaasLogsInput Resource

new DbaasLogsInput(name: string, args: DbaasLogsInputArgs, opts?: CustomResourceOptions);
@overload
def DbaasLogsInput(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   allowed_networks: Optional[Sequence[str]] = None,
                   configuration: Optional[DbaasLogsInputConfigurationArgs] = None,
                   description: Optional[str] = None,
                   engine_id: Optional[str] = None,
                   exposed_port: Optional[str] = None,
                   nb_instance: Optional[int] = None,
                   service_name: Optional[str] = None,
                   stream_id: Optional[str] = None,
                   title: Optional[str] = None)
@overload
def DbaasLogsInput(resource_name: str,
                   args: DbaasLogsInputArgs,
                   opts: Optional[ResourceOptions] = None)
func NewDbaasLogsInput(ctx *Context, name string, args DbaasLogsInputArgs, opts ...ResourceOption) (*DbaasLogsInput, error)
public DbaasLogsInput(string name, DbaasLogsInputArgs args, CustomResourceOptions? opts = null)
public DbaasLogsInput(String name, DbaasLogsInputArgs args)
public DbaasLogsInput(String name, DbaasLogsInputArgs args, CustomResourceOptions options)
type: ovh:DbaasLogsInput
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Configuration Lbrlabs.PulumiPackage.Ovh.Inputs.DbaasLogsInputConfigurationArgs

Input configuration

Description string

Input description

EngineId string

Input engine ID

ServiceName string

service name

StreamId string

Associated Graylog stream

Title string

Input title

AllowedNetworks List<string>

List of IP blocks

ExposedPort string

Port

NbInstance int

Number of instance running

Configuration DbaasLogsInputConfigurationArgs

Input configuration

Description string

Input description

EngineId string

Input engine ID

ServiceName string

service name

StreamId string

Associated Graylog stream

Title string

Input title

AllowedNetworks []string

List of IP blocks

ExposedPort string

Port

NbInstance int

Number of instance running

configuration DbaasLogsInputConfigurationArgs

Input configuration

description String

Input description

engineId String

Input engine ID

serviceName String

service name

streamId String

Associated Graylog stream

title String

Input title

allowedNetworks List<String>

List of IP blocks

exposedPort String

Port

nbInstance Integer

Number of instance running

configuration DbaasLogsInputConfigurationArgs

Input configuration

description string

Input description

engineId string

Input engine ID

serviceName string

service name

streamId string

Associated Graylog stream

title string

Input title

allowedNetworks string[]

List of IP blocks

exposedPort string

Port

nbInstance number

Number of instance running

configuration DbaasLogsInputConfigurationArgs

Input configuration

description str

Input description

engine_id str

Input engine ID

service_name str

service name

stream_id str

Associated Graylog stream

title str

Input title

allowed_networks Sequence[str]

List of IP blocks

exposed_port str

Port

nb_instance int

Number of instance running

configuration Property Map

Input configuration

description String

Input description

engineId String

Input engine ID

serviceName String

service name

streamId String

Associated Graylog stream

title String

Input title

allowedNetworks List<String>

List of IP blocks

exposedPort String

Port

nbInstance Number

Number of instance running

Outputs

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

CreatedAt string

Input creation

Hostname string

Hostname

Id string

The provider-assigned unique ID for this managed resource.

InputId string

Input ID

IsRestartRequired bool

Indicate if input need to be restarted

PublicAddress string

Input IP address

SslCertificate string

Input SSL certificate

Status string

init: configuration required, pending: ready to start, running: available

UpdatedAt string

Input last update

CreatedAt string

Input creation

Hostname string

Hostname

Id string

The provider-assigned unique ID for this managed resource.

InputId string

Input ID

IsRestartRequired bool

Indicate if input need to be restarted

PublicAddress string

Input IP address

SslCertificate string

Input SSL certificate

Status string

init: configuration required, pending: ready to start, running: available

UpdatedAt string

Input last update

createdAt String

Input creation

hostname String

Hostname

id String

The provider-assigned unique ID for this managed resource.

inputId String

Input ID

isRestartRequired Boolean

Indicate if input need to be restarted

publicAddress String

Input IP address

sslCertificate String

Input SSL certificate

status String

init: configuration required, pending: ready to start, running: available

updatedAt String

Input last update

createdAt string

Input creation

hostname string

Hostname

id string

The provider-assigned unique ID for this managed resource.

inputId string

Input ID

isRestartRequired boolean

Indicate if input need to be restarted

publicAddress string

Input IP address

sslCertificate string

Input SSL certificate

status string

init: configuration required, pending: ready to start, running: available

updatedAt string

Input last update

created_at str

Input creation

hostname str

Hostname

id str

The provider-assigned unique ID for this managed resource.

input_id str

Input ID

is_restart_required bool

Indicate if input need to be restarted

public_address str

Input IP address

ssl_certificate str

Input SSL certificate

status str

init: configuration required, pending: ready to start, running: available

updated_at str

Input last update

createdAt String

Input creation

hostname String

Hostname

id String

The provider-assigned unique ID for this managed resource.

inputId String

Input ID

isRestartRequired Boolean

Indicate if input need to be restarted

publicAddress String

Input IP address

sslCertificate String

Input SSL certificate

status String

init: configuration required, pending: ready to start, running: available

updatedAt String

Input last update

Look up an Existing DbaasLogsInput Resource

Get an existing DbaasLogsInput 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?: DbaasLogsInputState, opts?: CustomResourceOptions): DbaasLogsInput
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allowed_networks: Optional[Sequence[str]] = None,
        configuration: Optional[DbaasLogsInputConfigurationArgs] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        engine_id: Optional[str] = None,
        exposed_port: Optional[str] = None,
        hostname: Optional[str] = None,
        input_id: Optional[str] = None,
        is_restart_required: Optional[bool] = None,
        nb_instance: Optional[int] = None,
        public_address: Optional[str] = None,
        service_name: Optional[str] = None,
        ssl_certificate: Optional[str] = None,
        status: Optional[str] = None,
        stream_id: Optional[str] = None,
        title: Optional[str] = None,
        updated_at: Optional[str] = None) -> DbaasLogsInput
func GetDbaasLogsInput(ctx *Context, name string, id IDInput, state *DbaasLogsInputState, opts ...ResourceOption) (*DbaasLogsInput, error)
public static DbaasLogsInput Get(string name, Input<string> id, DbaasLogsInputState? state, CustomResourceOptions? opts = null)
public static DbaasLogsInput get(String name, Output<String> id, DbaasLogsInputState 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:
AllowedNetworks List<string>

List of IP blocks

Configuration Lbrlabs.PulumiPackage.Ovh.Inputs.DbaasLogsInputConfigurationArgs

Input configuration

CreatedAt string

Input creation

Description string

Input description

EngineId string

Input engine ID

ExposedPort string

Port

Hostname string

Hostname

InputId string

Input ID

IsRestartRequired bool

Indicate if input need to be restarted

NbInstance int

Number of instance running

PublicAddress string

Input IP address

ServiceName string

service name

SslCertificate string

Input SSL certificate

Status string

init: configuration required, pending: ready to start, running: available

StreamId string

Associated Graylog stream

Title string

Input title

UpdatedAt string

Input last update

AllowedNetworks []string

List of IP blocks

Configuration DbaasLogsInputConfigurationArgs

Input configuration

CreatedAt string

Input creation

Description string

Input description

EngineId string

Input engine ID

ExposedPort string

Port

Hostname string

Hostname

InputId string

Input ID

IsRestartRequired bool

Indicate if input need to be restarted

NbInstance int

Number of instance running

PublicAddress string

Input IP address

ServiceName string

service name

SslCertificate string

Input SSL certificate

Status string

init: configuration required, pending: ready to start, running: available

StreamId string

Associated Graylog stream

Title string

Input title

UpdatedAt string

Input last update

allowedNetworks List<String>

List of IP blocks

configuration DbaasLogsInputConfigurationArgs

Input configuration

createdAt String

Input creation

description String

Input description

engineId String

Input engine ID

exposedPort String

Port

hostname String

Hostname

inputId String

Input ID

isRestartRequired Boolean

Indicate if input need to be restarted

nbInstance Integer

Number of instance running

publicAddress String

Input IP address

serviceName String

service name

sslCertificate String

Input SSL certificate

status String

init: configuration required, pending: ready to start, running: available

streamId String

Associated Graylog stream

title String

Input title

updatedAt String

Input last update

allowedNetworks string[]

List of IP blocks

configuration DbaasLogsInputConfigurationArgs

Input configuration

createdAt string

Input creation

description string

Input description

engineId string

Input engine ID

exposedPort string

Port

hostname string

Hostname

inputId string

Input ID

isRestartRequired boolean

Indicate if input need to be restarted

nbInstance number

Number of instance running

publicAddress string

Input IP address

serviceName string

service name

sslCertificate string

Input SSL certificate

status string

init: configuration required, pending: ready to start, running: available

streamId string

Associated Graylog stream

title string

Input title

updatedAt string

Input last update

allowed_networks Sequence[str]

List of IP blocks

configuration DbaasLogsInputConfigurationArgs

Input configuration

created_at str

Input creation

description str

Input description

engine_id str

Input engine ID

exposed_port str

Port

hostname str

Hostname

input_id str

Input ID

is_restart_required bool

Indicate if input need to be restarted

nb_instance int

Number of instance running

public_address str

Input IP address

service_name str

service name

ssl_certificate str

Input SSL certificate

status str

init: configuration required, pending: ready to start, running: available

stream_id str

Associated Graylog stream

title str

Input title

updated_at str

Input last update

allowedNetworks List<String>

List of IP blocks

configuration Property Map

Input configuration

createdAt String

Input creation

description String

Input description

engineId String

Input engine ID

exposedPort String

Port

hostname String

Hostname

inputId String

Input ID

isRestartRequired Boolean

Indicate if input need to be restarted

nbInstance Number

Number of instance running

publicAddress String

Input IP address

serviceName String

service name

sslCertificate String

Input SSL certificate

status String

init: configuration required, pending: ready to start, running: available

streamId String

Associated Graylog stream

title String

Input title

updatedAt String

Input last update

Supporting Types

DbaasLogsInputConfiguration

flowgger Property Map

Flowgger configuration

logstash Property Map

Logstash configuration

DbaasLogsInputConfigurationFlowgger

LogFormat string

Type of format to decode. One of "RFC5424", "LTSV", "GELF", "CAPNP"

LogFraming string

Indicates how messages are delimited. One of "LINE", "NUL", "SYSLEN", "CAPNP"

LogFormat string

Type of format to decode. One of "RFC5424", "LTSV", "GELF", "CAPNP"

LogFraming string

Indicates how messages are delimited. One of "LINE", "NUL", "SYSLEN", "CAPNP"

logFormat String

Type of format to decode. One of "RFC5424", "LTSV", "GELF", "CAPNP"

logFraming String

Indicates how messages are delimited. One of "LINE", "NUL", "SYSLEN", "CAPNP"

logFormat string

Type of format to decode. One of "RFC5424", "LTSV", "GELF", "CAPNP"

logFraming string

Indicates how messages are delimited. One of "LINE", "NUL", "SYSLEN", "CAPNP"

log_format str

Type of format to decode. One of "RFC5424", "LTSV", "GELF", "CAPNP"

log_framing str

Indicates how messages are delimited. One of "LINE", "NUL", "SYSLEN", "CAPNP"

logFormat String

Type of format to decode. One of "RFC5424", "LTSV", "GELF", "CAPNP"

logFraming String

Indicates how messages are delimited. One of "LINE", "NUL", "SYSLEN", "CAPNP"

DbaasLogsInputConfigurationLogstash

InputSection string

The filter section of logstash.conf

FilterSection string

The filter section of logstash.conf

PatternSection string

The list of customs Grok patterns

InputSection string

The filter section of logstash.conf

FilterSection string

The filter section of logstash.conf

PatternSection string

The list of customs Grok patterns

inputSection String

The filter section of logstash.conf

filterSection String

The filter section of logstash.conf

patternSection String

The list of customs Grok patterns

inputSection string

The filter section of logstash.conf

filterSection string

The filter section of logstash.conf

patternSection string

The list of customs Grok patterns

input_section str

The filter section of logstash.conf

filter_section str

The filter section of logstash.conf

pattern_section str

The list of customs Grok patterns

inputSection String

The filter section of logstash.conf

filterSection String

The filter section of logstash.conf

patternSection String

The list of customs Grok patterns

Package Details

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

This Pulumi package is based on the ovh Terraform Provider.