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
Copy file name to clipboardExpand all lines: docs/index.md
+53-2Lines changed: 53 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,14 @@ description: |-
6
6
It provides a seamless integration with Terraform, enabling you to define and manage your cloud infrastructure as code.
7
7
---
8
8
9
-
# zstack Provider
9
+
# ZStack Provider
10
10
11
11
12
12
13
13
The ZStack provider is designed to manage resources in a ZStack Cloud environment.
14
14
It provides a way to interact with ZStack's API to create, update, and delete resources such as virtual machines, networks, storage, and more.
15
15
This provider is ideal for organizations looking to automate their cloud infrastructure management using Terraform.
16
16
17
-
18
17
## Example Usage
19
18
20
19
To use the ZStack provider, you need to configure it with the necessary credentials and endpoint information. Login ZStack Cloud, Operation Management -> Access Control -> AccessKey Management, Click Generate AccessKey
@@ -23,11 +22,63 @@ Below is an example configuration:
23
22
```terraform
24
23
# Copyright (c) ZStack.io, Inc.
25
24
25
+
# Configure the ZStack provider with the necessary credentials and endpoint information.
26
+
# - `host`: The IP address or domain name of the ZStack Cloud API endpoint.
27
+
# - `access_key_id`: The Access Key ID for authenticating with ZStack Cloud.
28
+
# - `access_key_secret`: The Access Key Secret for authenticating with ZStack Cloud.
29
+
26
30
provider "zstack" {
27
31
host = "ip address of zstack cloud api endpoint"
28
32
access_key_id = "access_key_id of zstack cloud"
29
33
access_key_secret = "access_key_secret of zstack cloud"
30
34
}
35
+
36
+
# Fetch the details of an image from ZStack Cloud by its name.
37
+
# - `name`: The name of the image to retrieve.
38
+
data "zstack_images" "centos" {
39
+
name = "Image-1"
40
+
}
41
+
42
+
# Fetch the details of an L3 network from ZStack Cloud by its name.
43
+
# - `name`: The name of the L3 network to retrieve.
44
+
data "zstack_l3networks" "l3networks" {
45
+
name = "L3Network-1"
46
+
}
47
+
48
+
# Fetch the details of an instance offering from ZStack Cloud by its name.
49
+
# - `name`: The name of the instance offering to retrieve.
50
+
data "zstack_instance_offers" "offer" {
51
+
name = "InstanceOffering-1"
52
+
}
53
+
54
+
# Create a new virtual machine instance in ZStack Cloud.
55
+
# - `name`: The name of the virtual machine.
56
+
# - `image_uuid`: The UUID of the image to use for the virtual machine.
57
+
# - `l3_network_uuids`: A list of L3 network UUIDs to attach to the virtual machine.
58
+
# - `description`: A description of the virtual machine.
59
+
# - `instance_offering_uuid`: The UUID of the instance offering to use for the virtual machine.
60
+
# - `memory_size`: (Optional) The memory size in bytes. If not specified, the instance offering's memory size will be used.
61
+
# - `cpu_num`: (Optional) The number of CPUs. If not specified, the instance offering's CPU count will be used.
62
+
# - `never_stop`: If set to `true`, the virtual machine will never be stopped.
63
+
# - `root_disk`: Configuration for the root disk of the virtual machine.
Copy file name to clipboardExpand all lines: templates/index.md.tmpl
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ The ZStack provider is designed to manage resources in a ZStack Cloud environmen
14
14
It provides a way to interact with ZStack's API to create, update, and delete resources such as virtual machines, networks, storage, and more.
15
15
This provider is ideal for organizations looking to automate their cloud infrastructure management using Terraform.
16
16
17
-
18
17
## Example Usage
19
18
20
19
To use the ZStack provider, you need to configure it with the necessary credentials and endpoint information. Login ZStack Cloud, Operation Management -> Access Control -> AccessKey Management, Click Generate AccessKey
0 commit comments