1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. Audit
HashiCorp Vault v6.0.0 published on Monday, Mar 25, 2024 by Pulumi

vault.Audit

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.0.0 published on Monday, Mar 25, 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", {
        options: {
            file_path: "C:/temp/audit.txt",
        },
        type: "file",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.Audit("test",
        options={
            "file_path": "C:/temp/audit.txt",
        },
        type="file")
    
    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{
    			Options: pulumi.StringMap{
    				"file_path": pulumi.String("C:/temp/audit.txt"),
    			},
    			Type: pulumi.String("file"),
    		})
    		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()
        {
            Options = 
            {
                { "file_path", "C:/temp/audit.txt" },
            },
            Type = "file",
        });
    
    });
    
    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()        
                .options(Map.of("file_path", "C:/temp/audit.txt"))
                .type("file")
                .build());
    
        }
    }
    
    resources:
      test:
        type: vault:Audit
        properties:
          options:
            file_path: C:/temp/audit.txt
          type: file
    

    Socket Audit Device)

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const test = new vault.Audit("test", {
        local: false,
        options: {
            address: "127.0.0.1:8000",
            description: "application x socket",
            socket_type: "tcp",
        },
        path: "app_socket",
        type: "socket",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.Audit("test",
        local=False,
        options={
            "address": "127.0.0.1:8000",
            "description": "application x socket",
            "socket_type": "tcp",
        },
        path="app_socket",
        type="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{
    			Local: pulumi.Bool(false),
    			Options: pulumi.StringMap{
    				"address":     pulumi.String("127.0.0.1:8000"),
    				"description": pulumi.String("application x socket"),
    				"socket_type": pulumi.String("tcp"),
    			},
    			Path: pulumi.String("app_socket"),
    			Type: pulumi.String("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()
        {
            Local = false,
            Options = 
            {
                { "address", "127.0.0.1:8000" },
                { "description", "application x socket" },
                { "socket_type", "tcp" },
            },
            Path = "app_socket",
            Type = "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()        
                .local(false)
                .options(Map.ofEntries(
                    Map.entry("address", "127.0.0.1:8000"),
                    Map.entry("description", "application x socket"),
                    Map.entry("socket_type", "tcp")
                ))
                .path("app_socket")
                .type("socket")
                .build());
    
        }
    }
    
    resources:
      test:
        type: vault:Audit
        properties:
          local: false
          options:
            address: 127.0.0.1:8000
            description: application x socket
            socket_type: tcp
          path: app_socket
          type: socket
    

    Create Audit Resource

    new Audit(name: string, args: AuditArgs, opts?: CustomResourceOptions);
    @overload
    def Audit(resource_name: 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)
    @overload
    def Audit(resource_name: str,
              args: AuditArgs,
              opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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
    

    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.0.0 published on Monday, Mar 25, 2024 by Pulumi