1. Packages
  2. Vault Provider
  3. API Docs
  4. Audit
HashiCorp Vault v6.3.2 published on Thursday, Oct 24, 2024 by Pulumi

vault.Audit

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.3.2 published on Thursday, Oct 24, 2024 by Pulumi

    Example Usage

    File Audit Device)

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const test = new vault.Audit("test", {
        type: "file",
        options: {
            file_path: "C:/temp/audit.txt",
        },
    });
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.Audit("test",
        type="file",
        options={
            "file_path": "C:/temp/audit.txt",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vault.NewAudit(ctx, "test", &vault.AuditArgs{
    			Type: pulumi.String("file"),
    			Options: pulumi.StringMap{
    				"file_path": pulumi.String("C:/temp/audit.txt"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Vault.Audit("test", new()
        {
            Type = "file",
            Options = 
            {
                { "file_path", "C:/temp/audit.txt" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.Audit;
    import com.pulumi.vault.AuditArgs;
    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 test = new Audit("test", AuditArgs.builder()
                .type("file")
                .options(Map.of("file_path", "C:/temp/audit.txt"))
                .build());
    
        }
    }
    
    resources:
      test:
        type: vault:Audit
        properties:
          type: file
          options:
            file_path: C:/temp/audit.txt
    

    Socket Audit Device)

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const test = new vault.Audit("test", {
        type: "socket",
        path: "app_socket",
        local: false,
        options: {
            address: "127.0.0.1:8000",
            socket_type: "tcp",
            description: "application x socket",
        },
    });
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.Audit("test",
        type="socket",
        path="app_socket",
        local=False,
        options={
            "address": "127.0.0.1:8000",
            "socket_type": "tcp",
            "description": "application x socket",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vault.NewAudit(ctx, "test", &vault.AuditArgs{
    			Type:  pulumi.String("socket"),
    			Path:  pulumi.String("app_socket"),
    			Local: pulumi.Bool(false),
    			Options: pulumi.StringMap{
    				"address":     pulumi.String("127.0.0.1:8000"),
    				"socket_type": pulumi.String("tcp"),
    				"description": pulumi.String("application x socket"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Vault.Audit("test", new()
        {
            Type = "socket",
            Path = "app_socket",
            Local = false,
            Options = 
            {
                { "address", "127.0.0.1:8000" },
                { "socket_type", "tcp" },
                { "description", "application x socket" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.Audit;
    import com.pulumi.vault.AuditArgs;
    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 test = new Audit("test", AuditArgs.builder()
                .type("socket")
                .path("app_socket")
                .local(false)
                .options(Map.ofEntries(
                    Map.entry("address", "127.0.0.1:8000"),
                    Map.entry("socket_type", "tcp"),
                    Map.entry("description", "application x socket")
                ))
                .build());
    
        }
    }
    
    resources:
      test:
        type: vault:Audit
        properties:
          type: socket
          path: app_socket
          local: false
          options:
            address: 127.0.0.1:8000
            socket_type: tcp
            description: application x socket
    

    Create Audit Resource

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

    Constructor syntax

    new Audit(name: string, args: AuditArgs, opts?: CustomResourceOptions);
    @overload
    def Audit(resource_name: str,
              args: AuditArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Audit(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              options: Optional[Mapping[str, str]] = None,
              type: Optional[str] = None,
              description: Optional[str] = None,
              local: Optional[bool] = None,
              namespace: Optional[str] = None,
              path: Optional[str] = None)
    func NewAudit(ctx *Context, name string, args AuditArgs, opts ...ResourceOption) (*Audit, error)
    public Audit(string name, AuditArgs args, CustomResourceOptions? opts = null)
    public Audit(String name, AuditArgs args)
    public Audit(String name, AuditArgs args, CustomResourceOptions options)
    
    type: vault:Audit
    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 AuditArgs
    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 AuditArgs
    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 AuditArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuditArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuditArgs
    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 auditResource = new Vault.Audit("auditResource", new()
    {
        Options = 
        {
            { "string", "string" },
        },
        Type = "string",
        Description = "string",
        Local = false,
        Namespace = "string",
        Path = "string",
    });
    
    example, err := vault.NewAudit(ctx, "auditResource", &vault.AuditArgs{
    	Options: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Type:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Local:       pulumi.Bool(false),
    	Namespace:   pulumi.String("string"),
    	Path:        pulumi.String("string"),
    })
    
    var auditResource = new Audit("auditResource", AuditArgs.builder()
        .options(Map.of("string", "string"))
        .type("string")
        .description("string")
        .local(false)
        .namespace("string")
        .path("string")
        .build());
    
    audit_resource = vault.Audit("auditResource",
        options={
            "string": "string",
        },
        type="string",
        description="string",
        local=False,
        namespace="string",
        path="string")
    
    const auditResource = new vault.Audit("auditResource", {
        options: {
            string: "string",
        },
        type: "string",
        description: "string",
        local: false,
        namespace: "string",
        path: "string",
    });
    
    type: vault:Audit
    properties:
        description: string
        local: false
        namespace: string
        options:
            string: string
        path: string
        type: string
    

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

    Options Dictionary<string, string>

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    Type string
    Type of the audit device, such as 'file'.
    Description string
    Human-friendly description of the audit device.
    Local bool
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Path string
    The path to mount the audit device. This defaults to the type.
    Options map[string]string

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    Type string
    Type of the audit device, such as 'file'.
    Description string
    Human-friendly description of the audit device.
    Local bool
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Path string
    The path to mount the audit device. This defaults to the type.
    options Map<String,String>

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    type String
    Type of the audit device, such as 'file'.
    description String
    Human-friendly description of the audit device.
    local Boolean
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path String
    The path to mount the audit device. This defaults to the type.
    options {[key: string]: string}

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    type string
    Type of the audit device, such as 'file'.
    description string
    Human-friendly description of the audit device.
    local boolean
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path string
    The path to mount the audit device. This defaults to the type.
    options Mapping[str, str]

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    type str
    Type of the audit device, such as 'file'.
    description str
    Human-friendly description of the audit device.
    local bool
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path str
    The path to mount the audit device. This defaults to the type.
    options Map<String>

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    type String
    Type of the audit device, such as 'file'.
    description String
    Human-friendly description of the audit device.
    local Boolean
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    path String
    The path to mount the audit device. This defaults to the type.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Audit 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 Audit Resource

    Get an existing Audit 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?: AuditState, opts?: CustomResourceOptions): Audit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            local: Optional[bool] = None,
            namespace: Optional[str] = None,
            options: Optional[Mapping[str, str]] = None,
            path: Optional[str] = None,
            type: Optional[str] = None) -> Audit
    func GetAudit(ctx *Context, name string, id IDInput, state *AuditState, opts ...ResourceOption) (*Audit, error)
    public static Audit Get(string name, Input<string> id, AuditState? state, CustomResourceOptions? opts = null)
    public static Audit get(String name, Output<String> id, AuditState 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:
    Description string
    Human-friendly description of the audit device.
    Local bool
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Options Dictionary<string, string>

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    Path string
    The path to mount the audit device. This defaults to the type.
    Type string
    Type of the audit device, such as 'file'.
    Description string
    Human-friendly description of the audit device.
    Local bool
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Options map[string]string

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    Path string
    The path to mount the audit device. This defaults to the type.
    Type string
    Type of the audit device, such as 'file'.
    description String
    Human-friendly description of the audit device.
    local Boolean
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    options Map<String,String>

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    path String
    The path to mount the audit device. This defaults to the type.
    type String
    Type of the audit device, such as 'file'.
    description string
    Human-friendly description of the audit device.
    local boolean
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    options {[key: string]: string}

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    path string
    The path to mount the audit device. This defaults to the type.
    type string
    Type of the audit device, such as 'file'.
    description str
    Human-friendly description of the audit device.
    local bool
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    options Mapping[str, str]

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    path str
    The path to mount the audit device. This defaults to the type.
    type str
    Type of the audit device, such as 'file'.
    description String
    Human-friendly description of the audit device.
    local Boolean
    Specifies if the audit device is a local only. Local audit devices are not replicated nor (if a secondary) removed by replication.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    options Map<String>

    Configuration options to pass to the audit device itself.

    For a reference of the device types and their options, consult the Vault documentation.

    path String
    The path to mount the audit device. This defaults to the type.
    type String
    Type of the audit device, such as 'file'.

    Import

    Audit devices can be imported using the path, e.g.

    $ pulumi import vault:index/audit:Audit test syslog
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.3.2 published on Thursday, Oct 24, 2024 by Pulumi