Skip to content

Commit 3e36f1b

Browse files
committed
Add security list item resources
1 parent 77b2046 commit 3e36f1b

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# First create a security list
2+
resource "elasticstack_kibana_security_list" "my_list" {
3+
list_id = "allowed_domains"
4+
name = "Allowed Domains"
5+
description = "List of allowed domains"
6+
type = "keyword"
7+
}
8+
9+
# Add an item to the list
10+
resource "elasticstack_kibana_security_list_item" "domain_example" {
11+
list_id = elasticstack_kibana_security_list.my_list.list_id
12+
value = "example.com"
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# First create an IP address list
2+
resource "elasticstack_kibana_security_list" "ip_list" {
3+
list_id = "allowed_ips"
4+
name = "Allowed IP Addresses"
5+
description = "List of allowed IP addresses"
6+
type = "ip"
7+
}
8+
9+
# Add an IP address to the list
10+
resource "elasticstack_kibana_security_list_item" "ip_example" {
11+
list_id = elasticstack_kibana_security_list.ip_list.list_id
12+
value = "192.168.1.1"
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# First create a security list
2+
resource "elasticstack_kibana_security_list" "tagged_domains" {
3+
list_id = "tagged_domains"
4+
name = "Tagged Domains"
5+
description = "Domains with associated metadata"
6+
type = "keyword"
7+
}
8+
9+
# Add an item with metadata
10+
resource "elasticstack_kibana_security_list_item" "domain_with_meta" {
11+
list_id = elasticstack_kibana_security_list.tagged_domains.list_id
12+
value = "internal.example.com"
13+
meta = jsonencode({
14+
category = "internal"
15+
owner = "infrastructure-team"
16+
note = "Primary internal domain"
17+
})
18+
}

0 commit comments

Comments
 (0)