1. Packages
  2. Aviatrix
  3. API Docs
  4. AviatrixFilebeatForwarder
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

aviatrix.AviatrixFilebeatForwarder

Explore with Pulumi AI

aviatrix logo
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

    The aviatrix_filebeat_forwarder resource allows the enabling and disabling of filebeat forwarder.

    Example Usage

    using System.Collections.Generic;
    using System.IO;
    using Pulumi;
    using Aviatrix = Pulumi.Aviatrix;
    
    return await Deployment.RunAsync(() => 
    {
        // Enable filebeat forwarder
        var testFilebeatForwarder = new Aviatrix.AviatrixFilebeatForwarder("testFilebeatForwarder", new()
        {
            Server = "1.2.3.4",
            Port = 10,
            TrustedCaFile = File.ReadAllText("/path/to/ca.pem"),
            ConfigFile = File.ReadAllText("/path/to/config.txt"),
            ExcludedGateways = new[]
            {
                "a",
                "b",
            },
        });
    
    });
    
    package main
    
    import (
    	"io/ioutil"
    
    	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := ioutil.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aviatrix.NewAviatrixFilebeatForwarder(ctx, "testFilebeatForwarder", &aviatrix.AviatrixFilebeatForwarderArgs{
    			Server:        pulumi.String("1.2.3.4"),
    			Port:          pulumi.Int(10),
    			TrustedCaFile: readFileOrPanic("/path/to/ca.pem"),
    			ConfigFile:    readFileOrPanic("/path/to/config.txt"),
    			ExcludedGateways: pulumi.StringArray{
    				pulumi.String("a"),
    				pulumi.String("b"),
    			},
    		})
    		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.AviatrixFilebeatForwarder;
    import com.pulumi.aviatrix.AviatrixFilebeatForwarderArgs;
    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 testFilebeatForwarder = new AviatrixFilebeatForwarder("testFilebeatForwarder", AviatrixFilebeatForwarderArgs.builder()        
                .server("1.2.3.4")
                .port(10)
                .trustedCaFile(Files.readString(Paths.get("/path/to/ca.pem")))
                .configFile(Files.readString(Paths.get("/path/to/config.txt")))
                .excludedGateways(            
                    "a",
                    "b")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aviatrix as aviatrix
    
    # Enable filebeat forwarder
    test_filebeat_forwarder = aviatrix.AviatrixFilebeatForwarder("testFilebeatForwarder",
        server="1.2.3.4",
        port=10,
        trusted_ca_file=(lambda path: open(path).read())("/path/to/ca.pem"),
        config_file=(lambda path: open(path).read())("/path/to/config.txt"),
        excluded_gateways=[
            "a",
            "b",
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aviatrix from "@astipkovits/aviatrix";
    import * as fs from "fs";
    
    // Enable filebeat forwarder
    const testFilebeatForwarder = new aviatrix.AviatrixFilebeatForwarder("testFilebeatForwarder", {
        server: "1.2.3.4",
        port: 10,
        trustedCaFile: fs.readFileSync("/path/to/ca.pem"),
        configFile: fs.readFileSync("/path/to/config.txt"),
        excludedGateways: [
            "a",
            "b",
        ],
    });
    
    resources:
      # Enable filebeat forwarder
      testFilebeatForwarder:
        type: aviatrix:AviatrixFilebeatForwarder
        properties:
          server: 1.2.3.4
          port: 10
          trustedCaFile:
            fn::readFile: /path/to/ca.pem
          configFile:
            fn::readFile: /path/to/config.txt
          excludedGateways:
            - a
            - b
    

    Create AviatrixFilebeatForwarder Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AviatrixFilebeatForwarder(name: string, args: AviatrixFilebeatForwarderArgs, opts?: CustomResourceOptions);
    @overload
    def AviatrixFilebeatForwarder(resource_name: str,
                                  args: AviatrixFilebeatForwarderArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AviatrixFilebeatForwarder(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  port: Optional[int] = None,
                                  server: Optional[str] = None,
                                  config_file: Optional[str] = None,
                                  excluded_gateways: Optional[Sequence[str]] = None,
                                  trusted_ca_file: Optional[str] = None)
    func NewAviatrixFilebeatForwarder(ctx *Context, name string, args AviatrixFilebeatForwarderArgs, opts ...ResourceOption) (*AviatrixFilebeatForwarder, error)
    public AviatrixFilebeatForwarder(string name, AviatrixFilebeatForwarderArgs args, CustomResourceOptions? opts = null)
    public AviatrixFilebeatForwarder(String name, AviatrixFilebeatForwarderArgs args)
    public AviatrixFilebeatForwarder(String name, AviatrixFilebeatForwarderArgs args, CustomResourceOptions options)
    
    type: aviatrix:AviatrixFilebeatForwarder
    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 AviatrixFilebeatForwarderArgs
    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 AviatrixFilebeatForwarderArgs
    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 AviatrixFilebeatForwarderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AviatrixFilebeatForwarderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AviatrixFilebeatForwarderArgs
    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 aviatrixFilebeatForwarderResource = new Aviatrix.AviatrixFilebeatForwarder("aviatrixFilebeatForwarderResource", new()
    {
        Port = 0,
        Server = "string",
        ConfigFile = "string",
        ExcludedGateways = new[]
        {
            "string",
        },
        TrustedCaFile = "string",
    });
    
    example, err := aviatrix.NewAviatrixFilebeatForwarder(ctx, "aviatrixFilebeatForwarderResource", &aviatrix.AviatrixFilebeatForwarderArgs{
    	Port:       pulumi.Int(0),
    	Server:     pulumi.String("string"),
    	ConfigFile: pulumi.String("string"),
    	ExcludedGateways: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TrustedCaFile: pulumi.String("string"),
    })
    
    var aviatrixFilebeatForwarderResource = new AviatrixFilebeatForwarder("aviatrixFilebeatForwarderResource", AviatrixFilebeatForwarderArgs.builder()
        .port(0)
        .server("string")
        .configFile("string")
        .excludedGateways("string")
        .trustedCaFile("string")
        .build());
    
    aviatrix_filebeat_forwarder_resource = aviatrix.AviatrixFilebeatForwarder("aviatrixFilebeatForwarderResource",
        port=0,
        server="string",
        config_file="string",
        excluded_gateways=["string"],
        trusted_ca_file="string")
    
    const aviatrixFilebeatForwarderResource = new aviatrix.AviatrixFilebeatForwarder("aviatrixFilebeatForwarderResource", {
        port: 0,
        server: "string",
        configFile: "string",
        excludedGateways: ["string"],
        trustedCaFile: "string",
    });
    
    type: aviatrix:AviatrixFilebeatForwarder
    properties:
        configFile: string
        excludedGateways:
            - string
        port: 0
        server: string
        trustedCaFile: string
    

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

    Port int
    Port number.
    Server string
    Server IP.
    ConfigFile string
    The config file. Use the file function to read from a file.
    ExcludedGateways List<string>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    TrustedCaFile string
    The trusted CA file. Use the file function to read from a file.
    Port int
    Port number.
    Server string
    Server IP.
    ConfigFile string
    The config file. Use the file function to read from a file.
    ExcludedGateways []string
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    TrustedCaFile string
    The trusted CA file. Use the file function to read from a file.
    port Integer
    Port number.
    server String
    Server IP.
    configFile String
    The config file. Use the file function to read from a file.
    excludedGateways List<String>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    trustedCaFile String
    The trusted CA file. Use the file function to read from a file.
    port number
    Port number.
    server string
    Server IP.
    configFile string
    The config file. Use the file function to read from a file.
    excludedGateways string[]
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    trustedCaFile string
    The trusted CA file. Use the file function to read from a file.
    port int
    Port number.
    server str
    Server IP.
    config_file str
    The config file. Use the file function to read from a file.
    excluded_gateways Sequence[str]
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    trusted_ca_file str
    The trusted CA file. Use the file function to read from a file.
    port Number
    Port number.
    server String
    Server IP.
    configFile String
    The config file. Use the file function to read from a file.
    excludedGateways List<String>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    trustedCaFile String
    The trusted CA file. Use the file function to read from a file.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of filebeat forwarder.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of filebeat forwarder.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of filebeat forwarder.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of filebeat forwarder.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of filebeat forwarder.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of filebeat forwarder.

    Look up Existing AviatrixFilebeatForwarder Resource

    Get an existing AviatrixFilebeatForwarder 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?: AviatrixFilebeatForwarderState, opts?: CustomResourceOptions): AviatrixFilebeatForwarder
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            config_file: Optional[str] = None,
            excluded_gateways: Optional[Sequence[str]] = None,
            port: Optional[int] = None,
            server: Optional[str] = None,
            status: Optional[str] = None,
            trusted_ca_file: Optional[str] = None) -> AviatrixFilebeatForwarder
    func GetAviatrixFilebeatForwarder(ctx *Context, name string, id IDInput, state *AviatrixFilebeatForwarderState, opts ...ResourceOption) (*AviatrixFilebeatForwarder, error)
    public static AviatrixFilebeatForwarder Get(string name, Input<string> id, AviatrixFilebeatForwarderState? state, CustomResourceOptions? opts = null)
    public static AviatrixFilebeatForwarder get(String name, Output<String> id, AviatrixFilebeatForwarderState 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:
    ConfigFile string
    The config file. Use the file 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 filebeat forwarder.
    TrustedCaFile string
    The trusted CA file. Use the file function to read from a file.
    ConfigFile string
    The config file. Use the file 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 filebeat forwarder.
    TrustedCaFile string
    The trusted CA file. Use the file function to read from a file.
    configFile String
    The config file. Use the file 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 filebeat forwarder.
    trustedCaFile String
    The trusted CA file. Use the file function to read from a file.
    configFile string
    The config file. Use the file 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 filebeat forwarder.
    trustedCaFile string
    The trusted CA file. Use the file function to read from a file.
    config_file str
    The config file. Use the file 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 filebeat forwarder.
    trusted_ca_file str
    The trusted CA file. Use the file function to read from a file.
    configFile String
    The config file. Use the file 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 filebeat forwarder.
    trustedCaFile String
    The trusted CA file. Use the file function to read from a file.

    Import

    filebeat_forwarder can be imported using “filebeat_forwarder”, e.g.

     $ pulumi import aviatrix:index/aviatrixFilebeatForwarder:AviatrixFilebeatForwarder test filebeat_forwarder
    

    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.
    aviatrix logo
    Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix