|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "elasticstack_kibana_security_list_item Resource - terraform-provider-elasticstack" |
| 4 | +subcategory: "Kibana" |
| 5 | +description: |- |
| 6 | + subcategory: "Kibana" |
| 7 | + layout: "" |
| 8 | + page_title: "Elasticstack: elasticstack_kibana_security_list_item Resource" |
| 9 | + description: |- |
| 10 | + Manages items within Kibana security value lists. |
| 11 | + Resource: elasticstack_kibana_security_list_item |
| 12 | + 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. |
| 13 | + 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. |
| 14 | + Example Usage |
| 15 | + |
| 16 | + # First create a security list |
| 17 | + resource "elasticstack_kibana_security_list" "ip_list" { |
| 18 | + list_id = "allowed_ips" |
| 19 | + name = "Allowed IP Addresses" |
| 20 | + description = "List of IP addresses that are allowed" |
| 21 | + type = "ip" |
| 22 | + } |
| 23 | + |
| 24 | + # Add an IP address to the list |
| 25 | + resource "elasticstack_kibana_security_list_item" "ip_item_1" { |
| 26 | + list_id = elasticstack_kibana_security_list.ip_list.list_id |
| 27 | + value = "192.168.1.1" |
| 28 | + } |
| 29 | + |
| 30 | + # Add another IP address |
| 31 | + resource "elasticstack_kibana_security_list_item" "ip_item_2" { |
| 32 | + list_id = elasticstack_kibana_security_list.ip_list.list_id |
| 33 | + value = "10.0.0.1" |
| 34 | + } |
| 35 | + |
| 36 | + # Add a keyword item with metadata |
| 37 | + resource "elasticstack_kibana_security_list" "keyword_list" { |
| 38 | + list_id = "allowed_domains" |
| 39 | + name = "Allowed Domains" |
| 40 | + description = "List of domains that are allowed" |
| 41 | + type = "keyword" |
| 42 | + } |
| 43 | + |
| 44 | + resource "elasticstack_kibana_security_list_item" "domain_item" { |
| 45 | + list_id = elasticstack_kibana_security_list.keyword_list.list_id |
| 46 | + value = "example.com" |
| 47 | + meta = jsonencode({ |
| 48 | + note = "Primary corporate domain" |
| 49 | + }) |
| 50 | + } |
| 51 | + |
| 52 | + Note on Space Support |
| 53 | + Important: The generated Kibana API client does not currently support space_id for list item operations. While the space_id attribute is available in the schema for future compatibility, list items currently operate in the default space only. This is a known limitation that will be addressed in a future update when the API client is regenerated with proper space support. |
| 54 | +--- |
| 55 | + |
| 56 | +# elasticstack_kibana_security_list_item (Resource) |
| 57 | + |
| 58 | +--- |
| 59 | +subcategory: "Kibana" |
| 60 | +layout: "" |
| 61 | +page_title: "Elasticstack: elasticstack_kibana_security_list_item Resource" |
| 62 | +description: |- |
| 63 | + Manages items within Kibana security value lists. |
| 64 | +--- |
| 65 | + |
| 66 | +# Resource: elasticstack_kibana_security_list_item |
| 67 | + |
| 68 | +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. |
| 69 | + |
| 70 | +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. |
| 71 | + |
| 72 | +## Example Usage |
| 73 | + |
| 74 | +```terraform |
| 75 | +# First create a security list |
| 76 | +resource "elasticstack_kibana_security_list" "ip_list" { |
| 77 | + list_id = "allowed_ips" |
| 78 | + name = "Allowed IP Addresses" |
| 79 | + description = "List of IP addresses that are allowed" |
| 80 | + type = "ip" |
| 81 | +} |
| 82 | +
|
| 83 | +# Add an IP address to the list |
| 84 | +resource "elasticstack_kibana_security_list_item" "ip_item_1" { |
| 85 | + list_id = elasticstack_kibana_security_list.ip_list.list_id |
| 86 | + value = "192.168.1.1" |
| 87 | +} |
| 88 | +
|
| 89 | +# Add another IP address |
| 90 | +resource "elasticstack_kibana_security_list_item" "ip_item_2" { |
| 91 | + list_id = elasticstack_kibana_security_list.ip_list.list_id |
| 92 | + value = "10.0.0.1" |
| 93 | +} |
| 94 | +
|
| 95 | +# Add a keyword item with metadata |
| 96 | +resource "elasticstack_kibana_security_list" "keyword_list" { |
| 97 | + list_id = "allowed_domains" |
| 98 | + name = "Allowed Domains" |
| 99 | + description = "List of domains that are allowed" |
| 100 | + type = "keyword" |
| 101 | +} |
| 102 | +
|
| 103 | +resource "elasticstack_kibana_security_list_item" "domain_item" { |
| 104 | + list_id = elasticstack_kibana_security_list.keyword_list.list_id |
| 105 | + value = "example.com" |
| 106 | + meta = jsonencode({ |
| 107 | + note = "Primary corporate domain" |
| 108 | + }) |
| 109 | +} |
| 110 | +``` |
| 111 | + |
| 112 | +## Note on Space Support |
| 113 | + |
| 114 | +**Important**: The generated Kibana API client does not currently support space_id for list item operations. While the `space_id` attribute is available in the schema for future compatibility, list items currently operate in the default space only. This is a known limitation that will be addressed in a future update when the API client is regenerated with proper space support. |
| 115 | + |
| 116 | +## Example Usage |
| 117 | + |
| 118 | +### Basic keyword value |
| 119 | + |
| 120 | +```terraform |
| 121 | +# First create a security list |
| 122 | +resource "elasticstack_kibana_security_list" "my_list" { |
| 123 | + list_id = "allowed_domains" |
| 124 | + name = "Allowed Domains" |
| 125 | + description = "List of allowed domains" |
| 126 | + type = "keyword" |
| 127 | +} |
| 128 | +
|
| 129 | +# Add an item to the list |
| 130 | +resource "elasticstack_kibana_security_list_item" "domain_example" { |
| 131 | + list_id = elasticstack_kibana_security_list.my_list.list_id |
| 132 | + value = "example.com" |
| 133 | +} |
| 134 | +``` |
| 135 | + |
| 136 | +### IP address value |
| 137 | + |
| 138 | +```terraform |
| 139 | +# First create an IP address list |
| 140 | +resource "elasticstack_kibana_security_list" "ip_list" { |
| 141 | + list_id = "allowed_ips" |
| 142 | + name = "Allowed IP Addresses" |
| 143 | + description = "List of allowed IP addresses" |
| 144 | + type = "ip" |
| 145 | +} |
| 146 | +
|
| 147 | +# Add an IP address to the list |
| 148 | +resource "elasticstack_kibana_security_list_item" "ip_example" { |
| 149 | + list_id = elasticstack_kibana_security_list.ip_list.list_id |
| 150 | + value = "192.168.1.1" |
| 151 | +} |
| 152 | +``` |
| 153 | + |
| 154 | +### Value with metadata |
| 155 | + |
| 156 | +```terraform |
| 157 | +# First create a security list |
| 158 | +resource "elasticstack_kibana_security_list" "tagged_domains" { |
| 159 | + list_id = "tagged_domains" |
| 160 | + name = "Tagged Domains" |
| 161 | + description = "Domains with associated metadata" |
| 162 | + type = "keyword" |
| 163 | +} |
| 164 | +
|
| 165 | +# Add an item with metadata |
| 166 | +resource "elasticstack_kibana_security_list_item" "domain_with_meta" { |
| 167 | + list_id = elasticstack_kibana_security_list.tagged_domains.list_id |
| 168 | + value = "internal.example.com" |
| 169 | + meta = jsonencode({ |
| 170 | + category = "internal" |
| 171 | + owner = "infrastructure-team" |
| 172 | + note = "Primary internal domain" |
| 173 | + }) |
| 174 | +} |
| 175 | +``` |
| 176 | + |
| 177 | +<!-- schema generated by tfplugindocs --> |
| 178 | +## Schema |
| 179 | + |
| 180 | +### Required |
| 181 | + |
| 182 | +- `list_id` (String) The value list's identifier that this item belongs to. |
| 183 | +- `value` (String) The value used to evaluate exceptions. The value's data type must match the list's type. |
| 184 | + |
| 185 | +### Optional |
| 186 | + |
| 187 | +- `id` (String) The value list item's identifier (auto-generated by Kibana if not specified). |
| 188 | +- `meta` (String) Placeholder for metadata about the value list item as JSON string. |
| 189 | +- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used. |
| 190 | + |
| 191 | +### Read-Only |
| 192 | + |
| 193 | +- `created_at` (String) The timestamp of when the list item was created. |
| 194 | +- `created_by` (String) The user who created the list item. |
| 195 | +- `updated_at` (String) The timestamp of when the list item was last updated. |
| 196 | +- `updated_by` (String) The user who last updated the list item. |
| 197 | +- `version` (String) The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version. |
0 commit comments