Audit
Import
Audit devices can be imported using the path
, e.g.
$ pulumi import vault:index/audit:Audit test syslog
Example Usage
File Audit Device)
using Pulumi;
using Vault = Pulumi.Vault;
class MyStack : Stack
{
public MyStack()
{
var test = new Vault.Audit("test", new Vault.AuditArgs
{
Options =
{
{ "file_path", "C:/temp/audit.txt" },
},
Type = "file",
});
}
}
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v3/go/vault"
"github.com/pulumi/pulumi/sdk/v2/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
})
}
import pulumi
import pulumi_vault as vault
test = vault.Audit("test",
options={
"file_path": "C:/temp/audit.txt",
},
type="file")
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",
});
Socket Audit Device)
using Pulumi;
using Vault = Pulumi.Vault;
class MyStack : Stack
{
public MyStack()
{
var test = new Vault.Audit("test", new Vault.AuditArgs
{
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/v3/go/vault"
"github.com/pulumi/pulumi/sdk/v2/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
})
}
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")
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",
});
Create a Audit Resource
new Audit(name: string, args: AuditArgs, opts?: CustomResourceOptions);
def Audit(resource_name: str, opts: Optional[ResourceOptions] = None, description: Optional[str] = None, local: Optional[bool] = None, options: Optional[Mapping[str, str]] = None, path: Optional[str] = None, type: Optional[str] = None)
func NewAudit(ctx *Context, name string, args AuditArgs, opts ...ResourceOption) (*Audit, error)
public Audit(string name, AuditArgs args, CustomResourceOptions? opts = null)
- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Audit Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Audit resource accepts the following input properties:
- Options Dictionary<string, string>
Configuration options to pass to the audit device itself.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- path str
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 str
- The provider-assigned unique ID for this managed resource.
Look up an 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, 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)
- 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.
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.
- Options Dictionary<string, string>
Configuration options to pass to the audit device itself.
- 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.
- Options map[string]string
Configuration options to pass to the audit device itself.
- 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.
- options {[key: string]: string}
Configuration options to pass to the audit device itself.
- 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.
- options Mapping[str, str]
Configuration options to pass to the audit device itself.
- path str
The path to mount the audit device. This defaults to the type.
- type str
Type of the audit device, such as ‘file’.
Package Details
- Repository
- https://github.com/pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.