-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the metal service to hpegl (#25)
* Adding the metal service to hpegl - Implemented the metal service into provider - Generated documentation for metal service
- Loading branch information
Showing
37 changed files
with
1,829 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
page_title: "hpegl_metal_available_images Data Source - terraform-provider-hpegl" | ||
subcategory: "metal" | ||
description: |- | ||
Provides a list of available Image Services for a project. | ||
--- | ||
# hpegl_metal_available_images (Data Source) | ||
Provides a list of available Image Services for a project. | ||
## Example Usage | ||
```terraform | ||
// (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP | ||
data "hpegl_metal_available_images" "centos" { | ||
filter { | ||
name = "flavor" | ||
values = ["(?i)centos"] // case insensitive for Centos or centos etc. | ||
} | ||
filter { | ||
name = "version" | ||
values = ["7.6.*"] // al 7.6.XXXX image variants | ||
} | ||
} | ||
output "images" { | ||
value = data.hpegl_metal_available_images.ubuntu.images | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `filter` (Block Set) (see [below for nested schema](#nestedblock--filter)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `images` (List of Object) (see [below for nested schema](#nestedatt--images)) | ||
|
||
<a id="nestedblock--filter"></a> | ||
### Nested Schema for `filter` | ||
|
||
Required: | ||
|
||
- `name` (String) | ||
- `values` (List of String) | ||
|
||
|
||
<a id="nestedatt--images"></a> | ||
### Nested Schema for `images` | ||
|
||
Read-Only: | ||
|
||
- `category` (String) | ||
- `flavor` (String) | ||
- `id` (String) | ||
- `version` (String) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
--- | ||
page_title: "hpegl_metal_available_resources Data Source - terraform-provider-hpegl" | ||
subcategory: "metal" | ||
description: |- | ||
Provides a list of available resources in a project for creating Hosts and Volumes. | ||
--- | ||
# hpegl_metal_available_resources (Data Source) | ||
Provides a list of available resources in a project for creating Hosts and Volumes. | ||
## Example Usage | ||
```terraform | ||
# (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP | ||
data "hpegl_metal_available_resources" "physical" { | ||
} | ||
output "locations" { | ||
value = data.hpegl_metal_available_resources.physical.locations | ||
} | ||
output "images" { | ||
value = data.hpegl_metal_available_resources.physical.images | ||
} | ||
output "ssh-keys" { | ||
value = data.hpegl_metal_available_resources.physical.ssh_keys | ||
} | ||
output "networks" { | ||
value = [for net in data.hpegl_metal_available_resources.physical.networks : net if net.location == var.location] | ||
} | ||
output "volumes" { | ||
value = [for vol in data.hpegl_metal_available_resources.physical.volumes : vol if vol.location == var.location] | ||
} | ||
output "volume-flavors" { | ||
value = data.hpegl_metal_available_resources.physical.volume_flavors | ||
} | ||
output "machine-sizes" { | ||
value = data.hpegl_metal_available_resources.physical.machine_sizes | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `filter` (Block Set) (see [below for nested schema](#nestedblock--filter)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `images` (List of Object) (see [below for nested schema](#nestedatt--images)) | ||
- `locations` (List of Object) (see [below for nested schema](#nestedatt--locations)) | ||
- `machine_sizes` (List of Object) (see [below for nested schema](#nestedatt--machine_sizes)) | ||
- `networks` (List of Object) (see [below for nested schema](#nestedatt--networks)) | ||
- `ssh_keys` (List of Object) (see [below for nested schema](#nestedatt--ssh_keys)) | ||
- `volume_flavors` (List of Object) (see [below for nested schema](#nestedatt--volume_flavors)) | ||
- `volumes` (List of Object) (see [below for nested schema](#nestedatt--volumes)) | ||
|
||
<a id="nestedblock--filter"></a> | ||
### Nested Schema for `filter` | ||
|
||
Required: | ||
|
||
- `name` (String) | ||
- `values` (List of String) | ||
|
||
|
||
<a id="nestedatt--images"></a> | ||
### Nested Schema for `images` | ||
|
||
Read-Only: | ||
|
||
- `category` (String) | ||
- `flavor` (String) | ||
- `id` (String) | ||
- `version` (String) | ||
|
||
|
||
<a id="nestedatt--locations"></a> | ||
### Nested Schema for `locations` | ||
|
||
Read-Only: | ||
|
||
- `country` (String) | ||
- `data_center` (String) | ||
- `id` (String) | ||
- `location` (String) | ||
- `region` (String) | ||
|
||
|
||
<a id="nestedatt--machine_sizes"></a> | ||
### Nested Schema for `machine_sizes` | ||
|
||
Read-Only: | ||
|
||
- `description` (String) | ||
- `id` (String) | ||
- `location` (String) | ||
- `location_id` (String) | ||
- `name` (String) | ||
- `quantity` (Number) | ||
|
||
|
||
<a id="nestedatt--networks"></a> | ||
### Nested Schema for `networks` | ||
|
||
Read-Only: | ||
|
||
- `description` (String) | ||
- `host_use` (String) | ||
- `id` (String) | ||
- `ip_pool` (Set of Object) (see [below for nested schema](#nestedobjatt--networks--ip_pool)) | ||
- `ip_pool_id` (String) | ||
- `location` (String) | ||
- `location_id` (String) | ||
- `name` (String) | ||
- `vlan` (Number) | ||
- `vni` (Number) | ||
|
||
<a id="nestedobjatt--networks--ip_pool"></a> | ||
### Nested Schema for `networks.ip_pool` | ||
|
||
Read-Only: | ||
|
||
- `base_ip` (String) | ||
- `default_route` (String) | ||
- `description` (String) | ||
- `dns` (List of String) | ||
- `ip_ver` (String) | ||
- `name` (String) | ||
- `netmask` (String) | ||
- `no_proxy` (String) | ||
- `ntp` (List of String) | ||
- `proxy` (String) | ||
- `sources` (List of Object) (see [below for nested schema](#nestedobjatt--networks--ip_pool--sources)) | ||
|
||
<a id="nestedobjatt--networks--ip_pool--sources"></a> | ||
### Nested Schema for `networks.ip_pool.sources` | ||
|
||
Read-Only: | ||
|
||
- `base_ip` (String) | ||
- `count` (Number) | ||
|
||
|
||
|
||
|
||
<a id="nestedatt--ssh_keys"></a> | ||
### Nested Schema for `ssh_keys` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `name` (String) | ||
|
||
|
||
<a id="nestedatt--volume_flavors"></a> | ||
### Nested Schema for `volume_flavors` | ||
|
||
Read-Only: | ||
|
||
- `description` (String) | ||
- `id` (String) | ||
- `name` (String) | ||
|
||
|
||
<a id="nestedatt--volumes"></a> | ||
### Nested Schema for `volumes` | ||
|
||
Read-Only: | ||
|
||
- `description` (String) | ||
- `flavor` (String) | ||
- `flavor_id` (String) | ||
- `id` (String) | ||
- `location` (String) | ||
- `location_id` (String) | ||
- `name` (String) | ||
- `shareable` (Boolean) | ||
- `size` (Number) | ||
- `state` (String) | ||
- `status` (String) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
page_title: "hpegl_metal_usage Data Source - terraform-provider-hpegl" | ||
subcategory: "metal" | ||
description: |- | ||
Get a usage report | ||
--- | ||
# hpegl_metal_usage (Data Source) | ||
Get a usage report | ||
## Example Usage | ||
```terraform | ||
// (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP | ||
variable "start" { | ||
default = "2020-01-13T07:44:00Z" | ||
} | ||
data "hpegl_metal_usage" "used" { | ||
start = var.start | ||
} | ||
output "compute_consumption" { | ||
value = data.hpegl_metal_usage.used.host_usage | ||
} | ||
output "volume_consumption" { | ||
value = data.hpegl_metal_usage.used.volume_usage | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `start` (String) Start time for usage calculation, format is RFC 3339 e.g. 2018-05-13T07:44:12Z | ||
|
||
### Optional | ||
|
||
- `end` (String) End time for usage calculation, format is RFC 3339 e.g. 2018-05-13T07:44:12Z | ||
|
||
### Read-Only | ||
|
||
- `host_usage` (List of Object) (see [below for nested schema](#nestedatt--host_usage)) | ||
- `id` (String) The ID of this resource. | ||
- `volume_usage` (List of Object) (see [below for nested schema](#nestedatt--volume_usage)) | ||
|
||
<a id="nestedatt--host_usage"></a> | ||
### Nested Schema for `host_usage` | ||
|
||
Read-Only: | ||
|
||
- `allocated` (String) | ||
- `end` (String) | ||
- `error` (String) | ||
- `freed` (String) | ||
- `id` (String) | ||
- `location_id` (String) | ||
- `machine_size` (String) | ||
- `machine_size_id` (String) | ||
- `name` (String) | ||
- `project_id` (String) | ||
- `ready` (String) | ||
- `start` (String) | ||
- `usage_hours` (Number) | ||
|
||
|
||
<a id="nestedatt--volume_usage"></a> | ||
### Nested Schema for `volume_usage` | ||
|
||
Read-Only: | ||
|
||
- `allocated` (String) | ||
- `capacity` (Number) | ||
- `end` (String) | ||
- `error` (String) | ||
- `falvor_id` (String) | ||
- `flavor` (String) | ||
- `freed` (String) | ||
- `id` (String) | ||
- `location_id` (String) | ||
- `name` (String) | ||
- `project_id` (String) | ||
- `ready` (String) | ||
- `start` (String) | ||
- `usage_hours` (Number) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.