You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`filter` (Map of String) Key-value pairs to filter image Storages. For example, to filter by status, use `Status = "Connected"`.
45
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
37
46
-`name` (String) Exact name for searching backup storage.
38
47
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
39
48
40
49
### Read-Only
41
50
42
51
-`backup_storages` (Attributes List) List of backup storage entries (see [below for nested schema](#nestedatt--backup_storages))
43
52
53
+
<aid="nestedblock--filter"></a>
54
+
### Nested Schema for `filter`
55
+
56
+
Required:
57
+
58
+
-`name` (String) Name of the field to filter by (e.g., status, state).
59
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
Copy file name to clipboardExpand all lines: docs/data-sources/clusters.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,17 @@ Fetches a list of clusters and their associated attributes.
17
17
data "zstack_clusters" "example" {
18
18
#name = "cluster1"
19
19
#name_pattern = "clu%" # Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
20
-
filter = { # option
21
-
State = "Enabled"
22
-
HypervisorType = "KVM"
23
-
Architecture = "x86_64"
20
+
filter {
21
+
name = "architecture"
22
+
values = ["aarch64", "x86_64"]
23
+
}
24
+
filter {
25
+
name = "state"
26
+
values = ["Enabled"]
27
+
}
28
+
filter {
29
+
name = "hypervisor_type"
30
+
values = ["KVM"]
24
31
}
25
32
}
26
33
@@ -34,20 +41,30 @@ output "zstack_clusters" {
34
41
35
42
### Optional
36
43
37
-
-`filter` (Map of String) Key-value pairs to filter Clusters. For example, to filter by CPU Architecture, use `Architecture = "x86_64"`.
44
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
38
45
-`name` (String) Exact name for searching Cluster
39
46
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
40
47
41
48
### Read-Only
42
49
43
50
-`clusters` (Attributes List) List of clusters matching the specified filters (see [below for nested schema](#nestedatt--clusters))
44
51
52
+
<aid="nestedblock--filter"></a>
53
+
### Nested Schema for `filter`
54
+
55
+
Required:
56
+
57
+
-`name` (String) Name of the field to filter by (e.g., status, state).
58
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
59
+
60
+
45
61
<aid="nestedatt--clusters"></a>
46
62
### Nested Schema for `clusters`
47
63
48
64
Read-Only:
49
65
50
-
-`hypervisortype` (String) Type of hypervisor used by the cluster (e.g., KVM, ESXi)
66
+
-`architecture` (String) Architecture of the cluster
67
+
-`hypervisor_type` (String) Type of hypervisor used by the cluster (e.g., KVM, ESXi)
51
68
-`name` (String) Name of the cluster
52
69
-`state` (String) State of the cluster (e.g., Enabled, Disabled)
Copy file name to clipboardExpand all lines: docs/data-sources/disk_offers.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,13 @@ Fetches a list of disk offers and their associated attributes from the ZStack en
17
17
data "zstack_disk_offers" "example" {
18
18
name = "smallDiskOffering"
19
19
# name_pattern = "sm%" # Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
20
-
filter = { # option
21
-
State = "Enabled"
20
+
filter {
21
+
name = "name"
22
+
values = ["name1", "name2"]
23
+
}
24
+
filter {
25
+
name = "state"
26
+
values = ["Enabled"]
22
27
}
23
28
}
24
29
@@ -32,14 +37,23 @@ output "zstack_disk_offers" {
32
37
33
38
### Optional
34
39
35
-
-`filter` (Map of String) Key-value pairs to filter disk offering. For example, to filter by State, use `State = "Enabled"`.
40
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
36
41
-`name` (String) Exact name for searching disk offer
37
42
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
38
43
39
44
### Read-Only
40
45
41
46
-`disk_offers` (Attributes List) (see [below for nested schema](#nestedatt--disk_offers))
42
47
48
+
<aid="nestedblock--filter"></a>
49
+
### Nested Schema for `filter`
50
+
51
+
Required:
52
+
53
+
-`name` (String) Name of the field to filter by (e.g., status, state).
54
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
Copy file name to clipboardExpand all lines: docs/data-sources/hosts.md
+25-6Lines changed: 25 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,21 @@ Fetches a list of hosts and their associated attributes from the ZStack environm
17
17
data "zstack_images" "example" {
18
18
# name = "imageName"
19
19
# name_pattern = "hostname%" # Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
20
-
filter = {
21
-
Status = "Ready"
22
-
State = "Enabled"
23
-
Platform = "Linux"
24
-
Architecture = "x86_64"
20
+
filter {
21
+
name = "architecture"
22
+
values = ["aarch64", "x86_64"]
23
+
}
24
+
filter {
25
+
name = "state"
26
+
values = ["Enabled"]
27
+
}
28
+
filter {
29
+
name = "status"
30
+
values = ["Ready", "Deleted"]
31
+
}
32
+
filter {
33
+
name = "guest_os_type"
34
+
values = ["Linux"]
25
35
}
26
36
}
27
37
@@ -35,14 +45,23 @@ output "zstack_images" {
35
45
36
46
### Optional
37
47
38
-
-`filter` (Map of String) Key-value pairs to filter hosts. For example, to filter by State, use `State = "Enabled"`.
48
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
39
49
-`name` (String) Exact name for searching hosts
40
50
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
41
51
42
52
### Read-Only
43
53
44
54
-`hosts` (Attributes List) List of host entries matching the specified filters (see [below for nested schema](#nestedatt--hosts))
45
55
56
+
<aid="nestedblock--filter"></a>
57
+
### Nested Schema for `filter`
58
+
59
+
Required:
60
+
61
+
-`name` (String) Name of the field to filter by (e.g., status, state).
62
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
Copy file name to clipboardExpand all lines: docs/data-sources/images.md
+25-8Lines changed: 25 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,13 +17,21 @@ Fetches a list of images and their associated attributes from the ZStack environ
17
17
data "zstack_hosts" "example" {
18
18
# name = "hostname"
19
19
# name_pattern = "hostname%" # Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
20
-
filter = { # option
21
-
State = "Enabled"
22
-
Status = "Connected"
23
-
HypervisorType = "KVM"
24
-
Architecture = "x86_64"
25
-
TotalCpuCapacity = "480"
26
-
ManagementIp = "172.30.3.4"
20
+
filter {
21
+
name = "architecture"
22
+
values = ["aarch64", "x86_64"]
23
+
}
24
+
filter {
25
+
name = "state"
26
+
values = ["Enabled"]
27
+
}
28
+
filter {
29
+
name = "status"
30
+
values = ["Disconnected"]
31
+
}
32
+
filter {
33
+
name = "cluster_uuid"
34
+
values = ["37c25209578c495ca176f60ad0cd97fa"]
27
35
}
28
36
}
29
37
@@ -37,14 +45,23 @@ output "zstack_hosts" {
37
45
38
46
### Optional
39
47
40
-
-`filter` (Map of String) Key-value pairs to filter images. For example, to filter by status, use `Status = "Ready"`.
48
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
41
49
-`name` (String) Exact name for searching images
42
50
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
43
51
44
52
### Read-Only
45
53
46
54
-`images` (Attributes List) List of Images (see [below for nested schema](#nestedatt--images))
47
55
56
+
<aid="nestedblock--filter"></a>
57
+
### Nested Schema for `filter`
58
+
59
+
Required:
60
+
61
+
-`name` (String) Name of the field to filter by (e.g., status, state).
62
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
-`filter` (Map of String) Key-value pairs to filter instance offering. For example, to filter by State, use `State = "Enabled"`.
48
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
36
49
-`name` (String) Exact name for searching instance offer
37
50
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
38
51
39
52
### Read-Only
40
53
41
54
-`instance_offers` (Attributes List) (see [below for nested schema](#nestedatt--instance_offers))
42
55
56
+
<aid="nestedblock--filter"></a>
57
+
### Nested Schema for `filter`
58
+
59
+
Required:
60
+
61
+
-`name` (String) Name of the field to filter by (e.g., status, state).
62
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
Copy file name to clipboardExpand all lines: docs/data-sources/instances.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,17 @@ Fetches a list of VM instances and their associated attributes from the ZStack e
17
17
data "zstack_instances" "vminstances" {
18
18
# name = "name of vm instance"
19
19
# name_pattern = "virtual machine instances name% Pattern" # Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
20
-
filter = { # option
21
-
State = "Running"
22
-
CPUNum = "3"
20
+
filter {
21
+
name = "architecture"
22
+
values = ["aarch64", "x86_64"]
23
+
}
24
+
filter {
25
+
name = "state"
26
+
values = ["Running", "Stopped"]
27
+
}
28
+
filter {
29
+
name = "hypervisor_type"
30
+
values = ["KVM"]
23
31
}
24
32
}
25
33
@@ -34,14 +42,23 @@ output "zstack_vminstances" {
34
42
35
43
### Optional
36
44
37
-
-`filter` (Map of String) Key-value pairs to filter instance . For example, to filter by State, use `State = "Running"`.
45
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
38
46
-`name` (String) Exact name for searching VM instance
39
47
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
40
48
41
49
### Read-Only
42
50
43
51
-`vminstances` (Attributes List) (see [below for nested schema](#nestedatt--vminstances))
44
52
53
+
<aid="nestedblock--filter"></a>
54
+
### Nested Schema for `filter`
55
+
56
+
Required:
57
+
58
+
-`name` (String) Name of the field to filter by (e.g., status, state).
59
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
Copy file name to clipboardExpand all lines: docs/data-sources/l2networks.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,13 @@ Fetches a list of L2 networks and their associated attributes from the ZStack en
17
17
data "zstack_l2networks" "networks" {
18
18
# name = "L2 networks name"
19
19
# name_pattern = "L2 networks name% Pattern" # Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
20
-
filter = {
21
-
Vlan = 36
22
-
Type = "L2VlanNetwork"
20
+
filter {
21
+
name = "vlan"
22
+
values = [36]
23
+
}
24
+
filter {
25
+
name = "physical_interface"
26
+
values = ["ens29f1"]
23
27
}
24
28
}
25
29
@@ -33,14 +37,23 @@ output "zstack_l2networks" {
33
37
34
38
### Optional
35
39
36
-
-`filter` (Map of String) Key-value pairs to filter L2 networks . For example, to filter by Vlan, use `Vlan = "2"`.
40
+
-`filter` (Block List) Filter resources based on any field in the schema. For example, to filter by status, use `name = "status"` and `values = ["Ready"]`. (see [below for nested schema](#nestedblock--filter))
37
41
-`name` (String) Exact name for searching L2 Network.
38
42
-`name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
39
43
40
44
### Read-Only
41
45
42
46
-`l2networks` (Attributes List) List of L2 networks matching the specified filters. (see [below for nested schema](#nestedatt--l2networks))
43
47
48
+
<aid="nestedblock--filter"></a>
49
+
### Nested Schema for `filter`
50
+
51
+
Required:
52
+
53
+
-`name` (String) Name of the field to filter by (e.g., status, state).
54
+
-`values` (Set of String) Values to filter by. Multiple values will be treated as an OR condition.
0 commit comments