Manages items within Kibana security value lists. Value lists are containers for values that can be used within exception lists to define conditions. This resource allows you to add, update, and remove individual values (items) in those lists.
Value list items are used to store data values that match the type of their parent security list (e.g., IP addresses, keywords, etc.). These items can then be referenced in exception list entries to define exception conditions.
Kibana docs can be found here
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
// First create a security list
const myList = new elasticstack.KibanaSecurityList("my_list", {
listId: "allowed_domains",
name: "Allowed Domains",
description: "List of allowed domains",
type: "keyword",
});
// Add an item to the list
const domainExample = new elasticstack.KibanaSecurityListItem("domain_example", {
listId: myList.listId,
value: "example.com",
meta: JSON.stringify({
category: "internal",
owner: "infrastructure-team",
note: "Primary internal domain",
}),
});
import pulumi
import json
import pulumi_elasticstack as elasticstack
# First create a security list
my_list = elasticstack.KibanaSecurityList("my_list",
list_id="allowed_domains",
name="Allowed Domains",
description="List of allowed domains",
type="keyword")
# Add an item to the list
domain_example = elasticstack.KibanaSecurityListItem("domain_example",
list_id=my_list.list_id,
value="example.com",
meta=json.dumps({
"category": "internal",
"owner": "infrastructure-team",
"note": "Primary internal domain",
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// First create a security list
myList, err := elasticstack.NewKibanaSecurityList(ctx, "my_list", &elasticstack.KibanaSecurityListArgs{
ListId: pulumi.String("allowed_domains"),
Name: pulumi.String("Allowed Domains"),
Description: pulumi.String("List of allowed domains"),
Type: pulumi.String("keyword"),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"category": "internal",
"owner": "infrastructure-team",
"note": "Primary internal domain",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
// Add an item to the list
_, err = elasticstack.NewKibanaSecurityListItem(ctx, "domain_example", &elasticstack.KibanaSecurityListItemArgs{
ListId: myList.ListId,
Value: pulumi.String("example.com"),
Meta: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
// First create a security list
var myList = new Elasticstack.KibanaSecurityList("my_list", new()
{
ListId = "allowed_domains",
Name = "Allowed Domains",
Description = "List of allowed domains",
Type = "keyword",
});
// Add an item to the list
var domainExample = new Elasticstack.KibanaSecurityListItem("domain_example", new()
{
ListId = myList.ListId,
Value = "example.com",
Meta = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["category"] = "internal",
["owner"] = "infrastructure-team",
["note"] = "Primary internal domain",
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.KibanaSecurityList;
import com.pulumi.elasticstack.KibanaSecurityListArgs;
import com.pulumi.elasticstack.KibanaSecurityListItem;
import com.pulumi.elasticstack.KibanaSecurityListItemArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
// First create a security list
var myList = new KibanaSecurityList("myList", KibanaSecurityListArgs.builder()
.listId("allowed_domains")
.name("Allowed Domains")
.description("List of allowed domains")
.type("keyword")
.build());
// Add an item to the list
var domainExample = new KibanaSecurityListItem("domainExample", KibanaSecurityListItemArgs.builder()
.listId(myList.listId())
.value("example.com")
.meta(serializeJson(
jsonObject(
jsonProperty("category", "internal"),
jsonProperty("owner", "infrastructure-team"),
jsonProperty("note", "Primary internal domain")
)))
.build());
}
}
resources:
# First create a security list
myList:
type: elasticstack:KibanaSecurityList
name: my_list
properties:
listId: allowed_domains
name: Allowed Domains
description: List of allowed domains
type: keyword
# Add an item to the list
domainExample:
type: elasticstack:KibanaSecurityListItem
name: domain_example
properties:
listId: ${myList.listId}
value: example.com
meta:
fn::toJSON:
category: internal
owner: infrastructure-team
note: Primary internal domain
Create KibanaSecurityListItem Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KibanaSecurityListItem(name: string, args: KibanaSecurityListItemArgs, opts?: CustomResourceOptions);@overload
def KibanaSecurityListItem(resource_name: str,
args: KibanaSecurityListItemArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KibanaSecurityListItem(resource_name: str,
opts: Optional[ResourceOptions] = None,
list_id: Optional[str] = None,
value: Optional[str] = None,
list_item_id: Optional[str] = None,
meta: Optional[str] = None,
space_id: Optional[str] = None)func NewKibanaSecurityListItem(ctx *Context, name string, args KibanaSecurityListItemArgs, opts ...ResourceOption) (*KibanaSecurityListItem, error)public KibanaSecurityListItem(string name, KibanaSecurityListItemArgs args, CustomResourceOptions? opts = null)
public KibanaSecurityListItem(String name, KibanaSecurityListItemArgs args)
public KibanaSecurityListItem(String name, KibanaSecurityListItemArgs args, CustomResourceOptions options)
type: elasticstack:KibanaSecurityListItem
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 KibanaSecurityListItemArgs
- 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 KibanaSecurityListItemArgs
- 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 KibanaSecurityListItemArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KibanaSecurityListItemArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KibanaSecurityListItemArgs
- 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 kibanaSecurityListItemResource = new Elasticstack.KibanaSecurityListItem("kibanaSecurityListItemResource", new()
{
ListId = "string",
Value = "string",
ListItemId = "string",
Meta = "string",
SpaceId = "string",
});
example, err := elasticstack.NewKibanaSecurityListItem(ctx, "kibanaSecurityListItemResource", &elasticstack.KibanaSecurityListItemArgs{
ListId: pulumi.String("string"),
Value: pulumi.String("string"),
ListItemId: pulumi.String("string"),
Meta: pulumi.String("string"),
SpaceId: pulumi.String("string"),
})
var kibanaSecurityListItemResource = new KibanaSecurityListItem("kibanaSecurityListItemResource", KibanaSecurityListItemArgs.builder()
.listId("string")
.value("string")
.listItemId("string")
.meta("string")
.spaceId("string")
.build());
kibana_security_list_item_resource = elasticstack.KibanaSecurityListItem("kibanaSecurityListItemResource",
list_id="string",
value="string",
list_item_id="string",
meta="string",
space_id="string")
const kibanaSecurityListItemResource = new elasticstack.KibanaSecurityListItem("kibanaSecurityListItemResource", {
listId: "string",
value: "string",
listItemId: "string",
meta: "string",
spaceId: "string",
});
type: elasticstack:KibanaSecurityListItem
properties:
listId: string
listItemId: string
meta: string
spaceId: string
value: string
KibanaSecurityListItem 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 KibanaSecurityListItem resource accepts the following input properties:
- List
Id string - The value list's identifier that this item belongs to.
- Value string
- The value used to evaluate exceptions. The value's data type must match the list's type.
- List
Item stringId - The value list item's identifier (auto-generated by Kibana if not specified).
- Meta string
- Placeholder for metadata about the value list item as JSON string.
- Space
Id string - An identifier for the space. If space_id is not provided, the default space is used.
- List
Id string - The value list's identifier that this item belongs to.
- Value string
- The value used to evaluate exceptions. The value's data type must match the list's type.
- List
Item stringId - The value list item's identifier (auto-generated by Kibana if not specified).
- Meta string
- Placeholder for metadata about the value list item as JSON string.
- Space
Id string - An identifier for the space. If space_id is not provided, the default space is used.
- list
Id String - The value list's identifier that this item belongs to.
- value String
- The value used to evaluate exceptions. The value's data type must match the list's type.
- list
Item StringId - The value list item's identifier (auto-generated by Kibana if not specified).
- meta String
- Placeholder for metadata about the value list item as JSON string.
- space
Id String - An identifier for the space. If space_id is not provided, the default space is used.
- list
Id string - The value list's identifier that this item belongs to.
- value string
- The value used to evaluate exceptions. The value's data type must match the list's type.
- list
Item stringId - The value list item's identifier (auto-generated by Kibana if not specified).
- meta string
- Placeholder for metadata about the value list item as JSON string.
- space
Id string - An identifier for the space. If space_id is not provided, the default space is used.
- list_
id str - The value list's identifier that this item belongs to.
- value str
- The value used to evaluate exceptions. The value's data type must match the list's type.
- list_
item_ strid - The value list item's identifier (auto-generated by Kibana if not specified).
- meta str
- Placeholder for metadata about the value list item as JSON string.
- space_
id str - An identifier for the space. If space_id is not provided, the default space is used.
- list
Id String - The value list's identifier that this item belongs to.
- value String
- The value used to evaluate exceptions. The value's data type must match the list's type.
- list
Item StringId - The value list item's identifier (auto-generated by Kibana if not specified).
- meta String
- Placeholder for metadata about the value list item as JSON string.
- space
Id String - An identifier for the space. If space_id is not provided, the default space is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the KibanaSecurityListItem resource produces the following output properties:
- Created
At string - The timestamp of when the list item was created.
- Created
By string - The user who created the list item.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - The timestamp of when the list item was last updated.
- Updated
By string - The user who last updated the list item.
- Version
Id string - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- Created
At string - The timestamp of when the list item was created.
- Created
By string - The user who created the list item.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - The timestamp of when the list item was last updated.
- Updated
By string - The user who last updated the list item.
- Version
Id string - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created
At String - The timestamp of when the list item was created.
- created
By String - The user who created the list item.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - The timestamp of when the list item was last updated.
- updated
By String - The user who last updated the list item.
- version
Id String - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created
At string - The timestamp of when the list item was created.
- created
By string - The user who created the list item.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
At string - The timestamp of when the list item was last updated.
- updated
By string - The user who last updated the list item.
- version
Id string - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created_
at str - The timestamp of when the list item was created.
- created_
by str - The user who created the list item.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - The timestamp of when the list item was last updated.
- updated_
by str - The user who last updated the list item.
- version_
id str - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created
At String - The timestamp of when the list item was created.
- created
By String - The user who created the list item.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - The timestamp of when the list item was last updated.
- updated
By String - The user who last updated the list item.
- version
Id String - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
Look up Existing KibanaSecurityListItem Resource
Get an existing KibanaSecurityListItem 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?: KibanaSecurityListItemState, opts?: CustomResourceOptions): KibanaSecurityListItem@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
list_id: Optional[str] = None,
list_item_id: Optional[str] = None,
meta: Optional[str] = None,
space_id: Optional[str] = None,
updated_at: Optional[str] = None,
updated_by: Optional[str] = None,
value: Optional[str] = None,
version_id: Optional[str] = None) -> KibanaSecurityListItemfunc GetKibanaSecurityListItem(ctx *Context, name string, id IDInput, state *KibanaSecurityListItemState, opts ...ResourceOption) (*KibanaSecurityListItem, error)public static KibanaSecurityListItem Get(string name, Input<string> id, KibanaSecurityListItemState? state, CustomResourceOptions? opts = null)public static KibanaSecurityListItem get(String name, Output<String> id, KibanaSecurityListItemState state, CustomResourceOptions options)resources: _: type: elasticstack:KibanaSecurityListItem get: id: ${id}- 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.
- Created
At string - The timestamp of when the list item was created.
- Created
By string - The user who created the list item.
- List
Id string - The value list's identifier that this item belongs to.
- List
Item stringId - The value list item's identifier (auto-generated by Kibana if not specified).
- Meta string
- Placeholder for metadata about the value list item as JSON string.
- Space
Id string - An identifier for the space. If space_id is not provided, the default space is used.
- Updated
At string - The timestamp of when the list item was last updated.
- Updated
By string - The user who last updated the list item.
- Value string
- The value used to evaluate exceptions. The value's data type must match the list's type.
- Version
Id string - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- Created
At string - The timestamp of when the list item was created.
- Created
By string - The user who created the list item.
- List
Id string - The value list's identifier that this item belongs to.
- List
Item stringId - The value list item's identifier (auto-generated by Kibana if not specified).
- Meta string
- Placeholder for metadata about the value list item as JSON string.
- Space
Id string - An identifier for the space. If space_id is not provided, the default space is used.
- Updated
At string - The timestamp of when the list item was last updated.
- Updated
By string - The user who last updated the list item.
- Value string
- The value used to evaluate exceptions. The value's data type must match the list's type.
- Version
Id string - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created
At String - The timestamp of when the list item was created.
- created
By String - The user who created the list item.
- list
Id String - The value list's identifier that this item belongs to.
- list
Item StringId - The value list item's identifier (auto-generated by Kibana if not specified).
- meta String
- Placeholder for metadata about the value list item as JSON string.
- space
Id String - An identifier for the space. If space_id is not provided, the default space is used.
- updated
At String - The timestamp of when the list item was last updated.
- updated
By String - The user who last updated the list item.
- value String
- The value used to evaluate exceptions. The value's data type must match the list's type.
- version
Id String - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created
At string - The timestamp of when the list item was created.
- created
By string - The user who created the list item.
- list
Id string - The value list's identifier that this item belongs to.
- list
Item stringId - The value list item's identifier (auto-generated by Kibana if not specified).
- meta string
- Placeholder for metadata about the value list item as JSON string.
- space
Id string - An identifier for the space. If space_id is not provided, the default space is used.
- updated
At string - The timestamp of when the list item was last updated.
- updated
By string - The user who last updated the list item.
- value string
- The value used to evaluate exceptions. The value's data type must match the list's type.
- version
Id string - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created_
at str - The timestamp of when the list item was created.
- created_
by str - The user who created the list item.
- list_
id str - The value list's identifier that this item belongs to.
- list_
item_ strid - The value list item's identifier (auto-generated by Kibana if not specified).
- meta str
- Placeholder for metadata about the value list item as JSON string.
- space_
id str - An identifier for the space. If space_id is not provided, the default space is used.
- updated_
at str - The timestamp of when the list item was last updated.
- updated_
by str - The user who last updated the list item.
- value str
- The value used to evaluate exceptions. The value's data type must match the list's type.
- version_
id str - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
- created
At String - The timestamp of when the list item was created.
- created
By String - The user who created the list item.
- list
Id String - The value list's identifier that this item belongs to.
- list
Item StringId - The value list item's identifier (auto-generated by Kibana if not specified).
- meta String
- Placeholder for metadata about the value list item as JSON string.
- space
Id String - An identifier for the space. If space_id is not provided, the default space is used.
- updated
At String - The timestamp of when the list item was last updated.
- updated
By String - The user who last updated the list item.
- value String
- The value used to evaluate exceptions. The value's data type must match the list's type.
- version
Id String - The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
