Commit 8adb94f 1 parent 9f3530f commit 8adb94f Copy full SHA for 8adb94f
File tree 1 file changed +58
-0
lines changed
1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ page_title : " Scaleway: scaleway_instance_servers"
3
+ description : |-
4
+ Gets information about multiple Instance Servers.
5
+ ---
6
+
7
+ # scaleway_instance_servers
8
+
9
+ Gets information about multiple instance servers.
10
+
11
+ ## Examples
12
+
13
+ ### Basic
14
+
15
+ ``` hcl
16
+ # Find servers by tag
17
+ data "scaleway_instance_servers" "my_key" {
18
+ tags = ["tag"]
19
+ }
20
+
21
+ # Find servers by name and zone
22
+ data "scaleway_instance_servers" "my_key" {
23
+ name = "myserver"
24
+ zone = "fr-par-2"
25
+ }
26
+ ```
27
+
28
+ ### With single datasource
29
+
30
+ ``` hcl
31
+ # Find servers by tag
32
+ data "scaleway_instance_servers" "servers_by_tag" {
33
+ tags = ["tag"]
34
+ }
35
+
36
+ data "scaleway_instance_servers" "map_of_servers" {
37
+ for_each = {for server in data.scaleway_instance_servers.servers_by_tag.servers: server.id => server}
38
+ server_id = each.value.id
39
+ }
40
+ ```
41
+
42
+ ## Argument Reference
43
+
44
+ - ` name ` - (Optional) The server name used as filter.
45
+
46
+ - ` tags ` - (Optional) List of tags used as filter.
47
+
48
+ - ` zone ` - (Defaults to [ provider] ( ../index.md#zone ) ` zone ` ) The [ zone] ( ../guides/regions_and_zones.md#zones ) in which servers exist.
49
+
50
+ ## Attributes Reference
51
+
52
+ In addition to all above arguments, the following attributes are exported:
53
+
54
+ - ` id ` - The zone of the servers
55
+
56
+ - ` servers ` - List of found servers
57
+ - ` id ` - The ID of the server.
58
+ - ` public_ip ` - The public IPv4 address of the server.
You can’t perform that action at this time.
0 commit comments