Skip to content

Commit 00a9b46

Browse files
committed
feat(instance offering resource and datasource): add support for instance offering rerouces and datasource
1 parent bb2d819 commit 00a9b46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+753
-128
lines changed

docs/data-sources/backupstorages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ List all backup storages, or query backup storages by exact name match, or query
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_backupstorages" "example" {
1818
# name = "backupstorage name"

docs/data-sources/clusters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of clusters and their associated attributes.
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_clusters" "example" {
1818
#name = "cluster1"

docs/data-sources/hosts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of hosts and their associated attributes from the ZStack environm
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_images" "example" {
1818
# name = "imageName"

docs/data-sources/images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of images and their associated attributes from the ZStack environ
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_hosts" "example" {
1818
# name = "hostname"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
page_title: "zstack_instance_offers Data Source - terraform-provider-zstack"
3+
subcategory: ""
4+
description: |-
5+
Fetches a list of instance offers and their associated attributes from the ZStack environment.
6+
---
7+
8+
# zstack_instance_offers (Data Source)
9+
10+
Fetches a list of instance offers and their associated attributes from the ZStack environment.
11+
12+
## Example Usage
13+
14+
```terraform
15+
# Copyright (c) ZStack.io, Inc.
16+
17+
data "zstack_instance_offers" "example" {
18+
19+
}
20+
21+
output "zstack_instance_offers" {
22+
value = data.zstack_instance_offers.example
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Optional
30+
31+
- `name` (String) Exact name for searching instance offer
32+
- `name_pattern` (String) Pattern for fuzzy name search, similar to MySQL LIKE. Use % for multiple characters and _ for exactly one character.
33+
34+
### Read-Only
35+
36+
- `instance_offers` (Attributes List) (see [below for nested schema](#nestedatt--instance_offers))
37+
38+
<a id="nestedatt--instance_offers"></a>
39+
### Nested Schema for `instance_offers`
40+
41+
Read-Only:
42+
43+
- `allocator_strategy` (String) The strategy used for allocating resources to the instance.
44+
- `cpu_num` (Number) The number of CPUs allocated to the instance offer.
45+
- `cpu_speed` (Number) The speed of each CPU in MHz.
46+
- `description` (String) A brief description of the instance offering.
47+
- `memory_size` (Number) The memory size allocated to the instance, in bytes.
48+
- `name` (String) The name of the instance offering.
49+
- `sort_key` (Number) The sort key used for ordering instance offerings.
50+
- `state` (String) The current state of the instance offering (e.g., Enabled, Disabled).
51+
- `type` (String) The type of the instance offering.
52+
- `uuid` (String) The unique identifier (UUID) of the instance offering.
53+
54+
55+

docs/data-sources/instances.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of VM instances and their associated attributes from the ZStack e
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_instances" "vminstances" {
1818
# name = "name of vm instance"

docs/data-sources/l2networks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of L2 networks and their associated attributes from the ZStack en
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_l2networks" "networks" {
1818
# name = "L2 networks name"

docs/data-sources/l3networks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of L3 networks and their associated attributes from the ZStack en
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_l3networks" "networks" {
1818
# name = "L3 networks name"

docs/data-sources/mnnodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of Management nodes and their associated attributes from the ZSta
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_mnnodes" "hosts" {
1818

docs/data-sources/vips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetches a list of vips and their associated attributes from the ZStack environme
1212
## Example Usage
1313

1414
```terraform
15-
# # Copyright (c) ZStack.io, Inc.
15+
# Copyright (c) ZStack.io, Inc.
1616
1717
data "zstack_vips" "test" {
1818

0 commit comments

Comments
 (0)