Compare commits

..

2 Commits
4.9.0 ... 4.8.x

Author SHA1 Message Date
f33b8e3e7d 4.8.5 2025-08-12 12:05:17 +03:00
asteam
5d15e83d56 4.8.4 2025-07-31 15:51:28 +03:00
5268 changed files with 3187 additions and 542808 deletions

View File

@@ -1,128 +1,8 @@
## Version 4.9.0
### Добавлено
#### account
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-823 | Опциональное поле `desc` в resource `decort_account` в cloudapi/account, в resource `decort_cb_account` в cloudbroker/account |
| BATF-823 | Вычисляемое поле `desc` в datasources `decort_cb_account_list` , `decort_cb_account_list_deleted`, `decort_cb_account`, `decort_cb_account_rg_list` в cloudbroker/account, в datasources `decort_account`, `decort_account_list`, `decort_account_deleted_list`, `decort_account_rg_list` в cloudapi/account |
| BATF-832 | Опциональное поле `reason` в resource `decort_cb_account` в cloudbroker/account и в resource `decort_account` в cloudapi/account|
#### audit
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-826 | Опциональное поле `request_id` в datasource `decort_cb_audit_list` в cloudbroker/audit |
| BATF-836 | Вычисляемое поле `physical_node` в datasource `decort_cb_audit_linked_jobs` в cloudbroker/audit |
| BATF-870 | Вычисляемое поле `ttl` в datasource `decort_cb_audit` и вычисляемые поля `ttl`, `args`, `kwargs`, `result`, `timestamp_end`, `remote_addr` и `tags` в datasource `decort_cb_audit_list` в cloudbroker/audit |
#### bservice
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-833 | Опциональное поле `chipset` в resource `decort_bservice_group` в cloudapi/bservice |
#### disks
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-873 | Вычисляемые поля `size_available`, `updated_by`, `deleted_by`, `created_by`, `updated_time` и `milestones` в datasource `decort_disk_list` и `decort_disk_list_deleted` в cloudapi/disks |
| BATF-873 | Вычисляемые поля `size_available`, `updated_by`, `deleted_by`, `created_by`, `updated_time`, `machine_id`, `machine_name` и `milestones` в datasource `decort_disk` в cloudapi/disks и в datasource `decort_cb_disk` в cloudbroker/disks |
| BATF-873 | Вычисляемые поля `size_available`, `updated_by`, `deleted_by`, `created_by` и `updated_time` в datasource `decort_cb_disk_list` в cloudbroker/disks |
| BATF-873 | Вычисляемые поля `machine_id`, `machine_name`, `updated_by`, `deleted_by`, `created_by` и `updated_time` в resource `decort_disk` в cloudapi/disks и в resource `decort_cb_disk` в cloudbroker/disks |
#### extnet
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-861 | Опциональное поле `ovs_bridge` в datasource `decort_extnet_list` в cloudapi/extnet |
| BATF-856 | Вычисляемое поле `ntp` в datasource `decort_extnet` в cloudapi/extnet и в datasource `decort_cb_extnet` в cloudbroker/extnet |
#### image
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-831 | Вычисляемое поле `snapshot_id` в datasource `decort_image` и resource `decort_image`, `decort_image_from_blank_compute`, `decort_image_from_platform_disk`, `decort_image_virtual` в cloudapi/image |
#### k8s
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-823 | Вычисляемое поле `desc` в datasources `decort_k8s`, `decort_k8s_list` в cloudapi/k8s|
#### kvmvm
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-828 | Опциональное поле `stack_name` в datasource `decort_cb_kvmvm_list` в cloudbroker/kvmvm |
| BATF-828 | Вычисляемое поле `stack_name` в datasource `decort_cb_kvmvm_list_deleted` в cloudbroker/kvmvm |
| BATF-829 | Опциональные поля `loader_type`, `boot_type`, `hot_resize`, `network_interface_naming` в resource `decort_kvmvm` в cloudapi/kvmvm и resource `decort_cb_kvmvm` в cloudbroker/kvmvm|
| BATF-829 | Вычисляемые поля `loader_type`, `boot_type`, `hot_resize`, `network_interface_naming` в datasources `decort_kvmvm`, `decort_kvmvm_list`, `decort_kvmvm_list_deleted` в cloudapi/kvmvm и datasources `decort_cb_kvmvm`, `decort_cb_kvmvm_list`, `decort_cb_kvmvm_list_deleted` в cloudbroker/kvmvm|
| BATF-830 | Вычисляемое поле `present_to` в resources `decort_cb_kvmvm` в cloudbroker/kvmvm и `decort_kvmvm` в cloudapi/kvmvm |
| BATF-837 | Вычисляемое поле `nid` в datasource `decort_cb_kvmvm_list` в cloudbroker/kvmvm |
| BATF-866 | Вычисляемое поле `size_available` в datasources `decort_cb_kvmvm` в cloudbroker/kvmvm и `decort_kvmvm` в cloudapi/kvmvm |
#### location
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-896 | Опциональное поле `sdn_support` в datasource `decort_locations_list` в cloudapi/location |
#### sep
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-822 | Datasources `decort_sep_and_pools_available_list` в cloudapi/sep и datasource `decort_cb_sep_and_pools_available_list` в cloudbroker/sep |
| BATF-839 | Datasource `decort_cb_sep_template` в cloudbroker/sep |
#### vins
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-821 | Опциональное поле `status` в datasource `decort_vins_list` в cloudapi/vins и datasource `decort_cb_vins_list` в cloudbroker/vins |
## Version 4.8.5
### Исправлено
#### disks
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-819 | Изменен тип поля `type` с Optional на Computed в resource `decort_disk` в cloudapi/disks и resource `decort_cb_disk` в cloudbroker/disks |
| BATF-830 | Изменен тип поля `present_to` с []int на map[string]int в datasources `decort_disk`, `decort_disk_list`, `decort_disk_replication`, в resources `decort_disk`, `decort_disk_replication` в cloudapi/disks, в datasources `decort_cb_disk`, `decort_cb_disk_replication`, `decort_cb_disk_list`, `decort_cb_disk_list_deleted`, `decort_cb_disk_list_unattached` и resources `decort_cb_disk`, `decort_cb_disk_replication` в cloudbroker/disks |
| BATF-835 | Изменен тип поля `gid` с Required на Computed в resource `decort_disk` в cloudapi/disks и resource `decort_cb_disk` в cloudbroker/disks |
#### image
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-830 | Изменен тип поля `present_to` с []int на map[string]int в datasource `decort_image`, resource `decort_virtual_image`, `decort_image_from_platform_disk`, `decort_image`, `decort_image_from_blank_compute` в cloudapi/image, в datasource `decort_cb_image` и resources `decort_cb_cdrom_image`, `decort_cb_virtual_image`, `decort_cb_image`, `decort_cb_image_from_blank_compute`, `decort_cb_image_from_platform_disk` в cloudbroker/image |
| BATF-835 | Изменен тип поля `gid` с Required на Computed в resource `decort_cb_image` и `decort_cb_image_cdrom` в cloudbroker/image |
| BATF-874 | Изменено возможное для ввода значение с `other` на `unknown` для поля `type` в resources `decort_image_from_blank_compute`, `decort_image_from_platform_disk`, `decort_image` в cloudapi/image и для поля `image_type` в resources `decort_cb_image_from_blank_compute`, `decort_cb_image_from_platform_disk` в cloudbroker/image|
| BATF-917 | Изменен тип поля `sep_id` с Optional на Computed в resource `decort_image_from_blank_compute`, `decort_image_from_platform_disk` в cloudapi/image и resources `decort_cb_image_from_blank_compute`, `decort_cb_image_from_platform_disk` в cloudbroker/image|
#### kvmvm
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-830 | Изменен тип поля `present_to` с []int на map[string]int в datasources `decort_kvmvm` в cloudapi/kvmvm и `decort_cb_kvmvm` в cloudbroker/kvmvm|
| BATF-859 | Изменен тип поля `pinned` с bool на int в resource `decort_cb_kvmvm` и data sources `decort_cb_kvmvm`, `decort_cb_kvmvm_list` и `decort_cb_kvmvm_list_deleted` в cloudbroker/kvmvm |
| BATF-868 | Изменен тип поля `mac` с computed на optional/computed в resources `decort_kvmvm`, `decort_cb_kvmvm` в cloudapi/kvmvm и cloudbroker/kvmvm|
| BATF-897 | Убраны ограничения по количеству сетей и дисков в resources `decort_kvmvm`, `decort_cb_kvmvm` в cloudapi/kvmvm и cloudbroker/kvmvm|
| BATF-919 | Изменено поведение ВМ при удалении дисков из поля `extra_disks`, теперь ВМ не останавливатся при отключении дисков |
| BATF-928 | Изменен тип поля `vgpus` c []int на []struct в resource `decort_kvmvm`, datasource `decort_kvmvm` в cloudapi/kvmvm и resource `decort_cb_kvmvm`, datasource `decort_cb_kvmvm` в cloudbroker/kvmvm |
#### vins
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-881 | Исправлена ошибка создания resource `decort_vins` с указанным блоком `ext_net` в cloudapi/vins |
### Удалено
#### account
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-922 | Обязательное поле `username` в resource `decort_account` в cloudapi/account |
#### disks
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-819 | Опциональное поле `ssd_size` в resource `decort_cb_disk` в cloudbroker/disks |
#### kvmvm
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-857 | Опциональное поле `depresent` в resource `decort_cb_kvmvm` в cloudbroker/kvmvm |
#### rg
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-838 | Опциональное поле `register_computes` в resource `decort_cb_rg` в cloudbroker/rg и `decort_resgroup` в cloudapi/rg |
| BATF-838 | Вычисляемое поле `register_computes` в datasourses `decort_cb_rg`, `decort_cb_rg_list`, `decort_cb_rg_list_deleted` в cloudbroker/rg и `decort_resgroup`, `decort_rg_list`, `decort_rg_list_deleted` в cloudapi/rg |
| BATF-1053 | Перезагрузка виртуальной машины при изменении полей `ram` и `cpu` в resources `decort_kvmvm` и `decort_cb_kvmvm` в cloudapi/kvmvm и в cloudbroker/kvmvm |

View File

@@ -7,7 +7,7 @@ ZIPDIR = ./zip
BINARY=${NAME}
WORKPATH= ./examples/terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAMESPACE}/${VERSION}/${OS_ARCH}
MAINPATH = ./cmd/decort/
VERSION=4.9.0
VERSION=4.8.5
OS_ARCH=$(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH)
FILES = ${BINARY}_${VERSION}_darwin_amd64\

View File

@@ -6,7 +6,6 @@ Terraform provider для платформы Digital Energy Cloud Orchestration
| Версия DECORT API | Версия провайдера Terraform |
| ------ | ------ |
| 4.3.0 | 4.9.x |
| 4.2.0 | 4.8.x |
| 4.1.0 | 4.7.x |
| 4.0.0 | 4.6.x |
@@ -48,8 +47,7 @@ Terraform provider для платформы Digital Energy Cloud Orchestration
- Работа с resource groups,
- Работа с snapshots,
- Работа с stacks,
- Работа с VINS,
- Работа с SEPs.
- Работа с VINS.
- Режим администратора:
- Работа с accounts,

View File

@@ -40,7 +40,6 @@ description: |-
- `deactivation_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `displayname` (String)
- `guid` (Number)
- `id` (String) The ID of this resource.

View File

@@ -51,7 +51,6 @@ Read-Only:
- `compute_features` (List of String)
- `created_time` (Number)
- `deleted_time` (Number)
- `desc` (String)
- `status` (String)
- `updated_time` (Number)

View File

@@ -52,7 +52,6 @@ Read-Only:
- `compute_features` (List of String)
- `created_time` (Number)
- `deleted_time` (Number)
- `desc` (String)
- `status` (String)
- `updated_time` (Number)

View File

@@ -56,7 +56,6 @@ Read-Only:
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `milestones` (Number)
- `resources` (List of Object) (see [below for nested schema](#nestedobjatt--items--resources))
- `rg_id` (Number)

View File

@@ -72,7 +72,6 @@ Optional:
Read-Only:
- `chipset` (String)
- `id` (Number)
- `ip_addresses` (List of String)
- `name` (String)

View File

@@ -39,7 +39,6 @@ description: |-
- `deactivation_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `displayname` (String)
- `guid` (Number)
- `id` (String) The ID of this resource.

View File

@@ -61,7 +61,6 @@ Read-Only:
- `deactivation_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `displayname` (String)
- `guid` (Number)
- `meta` (List of String)

View File

@@ -60,7 +60,6 @@ Read-Only:
- `deactivation_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `displayname` (String)
- `guid` (Number)
- `meta` (List of String)

View File

@@ -56,7 +56,6 @@ Read-Only:
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `milestones` (Number)
- `resources` (List of Object) (see [below for nested schema](#nestedobjatt--items--resources))
- `rg_id` (Number)

View File

@@ -37,7 +37,6 @@ description: |-
- `tags` (String)
- `timestamp` (Number)
- `timestamp_end` (Number)
- `ttl` (String)
- `user` (String)
<a id="nestedblock--timeouts"></a>

View File

@@ -45,7 +45,6 @@ Read-Only:
- `cmd` (String)
- `guid` (String)
- `nid` (Number)
- `physical_node` (Boolean)
- `state` (String)
- `time_create` (Number)
- `time_start` (Number)

View File

@@ -21,7 +21,6 @@ description: |-
- `max_status_code` (Number) find by HTTP max status code
- `min_status_code` (Number) find by HTTP min status code
- `page` (Number) page number
- `request_id` (String) request id
- `size` (Number) page size
- `sort_by` (String) sort by one of supported fields, format +|-(field)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
@@ -49,16 +48,9 @@ Optional:
Read-Only:
- `args` (String)
- `call` (String)
- `guid` (String)
- `kwargs` (String)
- `remote_addr` (String)
- `responsetime` (Number)
- `result` (String)
- `status_code` (Number)
- `tags` (String)
- `timestamp` (Number)
- `timestamp_end` (Number)
- `ttl` (String)
- `user` (String)

View File

@@ -30,9 +30,7 @@ description: |-
- `acl` (String)
- `boot_partition` (Number)
- `computes` (List of Object) (see [below for nested schema](#nestedatt--computes))
- `created_by` (String)
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `destruction_time` (Number)
@@ -47,8 +45,6 @@ description: |-
- `iotune` (List of Object) (see [below for nested schema](#nestedatt--iotune))
- `iqn` (String)
- `login` (String)
- `machine_id` (Number)
- `machine_name` (String)
- `milestones` (Number)
- `order` (Number)
- `params` (String)
@@ -56,7 +52,7 @@ description: |-
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)
@@ -68,15 +64,12 @@ description: |-
- `sep_id` (Number)
- `sep_type` (String)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedatt--snapshots))
- `status` (String)
- `tech_status` (String)
- `type` (String)
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number)
<a id="nestedblock--timeouts"></a>

View File

@@ -57,9 +57,7 @@ Read-Only:
- `acl` (String)
- `boot_partition` (Number)
- `computes` (List of Object) (see [below for nested schema](#nestedobjatt--items--computes))
- `created_by` (String)
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `destruction_time` (Number)
@@ -83,7 +81,7 @@ Read-Only:
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)
@@ -95,15 +93,12 @@ Read-Only:
- `sep_id` (Number)
- `sep_type` (String)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedobjatt--items--snapshots))
- `status` (String)
- `tech_status` (String)
- `type` (String)
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number)
<a id="nestedobjatt--items--computes"></a>

View File

@@ -54,9 +54,7 @@ Read-Only:
- `acl` (String)
- `boot_partition` (Number)
- `computes` (List of Object) (see [below for nested schema](#nestedobjatt--items--computes))
- `created_by` (String)
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `destruction_time` (Number)
@@ -80,7 +78,7 @@ Read-Only:
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)
@@ -92,15 +90,12 @@ Read-Only:
- `sep_id` (Number)
- `sep_type` (String)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedobjatt--items--snapshots))
- `status` (String)
- `tech_status` (String)
- `type` (String)
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number)
<a id="nestedobjatt--items--computes"></a>

View File

@@ -77,7 +77,7 @@ Read-Only:
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)

View File

@@ -53,7 +53,7 @@ description: |-
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)

View File

@@ -43,7 +43,6 @@ description: |-
- `name` (String)
- `network` (String)
- `network_id` (Number)
- `ntp` (List of String)
- `ovs_bridge` (String)
- `pre_reservations_num` (Number)
- `prefix` (Number)

View File

@@ -50,7 +50,7 @@ description: |-
- `network_interface_naming` (String)
- `password` (String) Optional password for the image
- `pool_name` (String) pool for image create
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)

View File

@@ -79,7 +79,7 @@ Read-Only:
- `network_interface_naming` (String)
- `password` (String)
- `pool_name` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)

View File

@@ -37,7 +37,6 @@ description: |-
- `boot_disk_id` (Number)
- `boot_disk_size` (Number)
- `boot_order` (List of String)
- `boot_type` (String)
- `cd_image_id` (Number)
- `chipset` (String)
- `clone_reference` (Number)
@@ -56,13 +55,11 @@ description: |-
- `driver` (String)
- `gid` (Number)
- `guid` (Number)
- `hot_resize` (Boolean)
- `hp_backed` (Boolean)
- `id` (String) The ID of this resource.
- `image_id` (Number)
- `image_name` (String)
- `interfaces` (List of Object) (see [below for nested schema](#nestedatt--interfaces))
- `loader_type` (String)
- `lock_status` (String)
- `manager_id` (Number)
- `manager_type` (String)
@@ -75,12 +72,11 @@ description: |-
- `natable_vins_network` (String)
- `natable_vins_network_name` (String)
- `need_reboot` (Boolean)
- `network_interface_naming` (String)
- `numa_affinity` (String)
- `numa_node_id` (Number)
- `os_users` (List of Object) (see [below for nested schema](#nestedatt--os_users))
- `pci_devices` (List of Number)
- `pinned` (Number)
- `pinned` (Boolean)
- `pool` (String)
- `preferred_cpu` (List of Number)
- `ram` (Number)
@@ -103,7 +99,7 @@ description: |-
- `updated_time` (Number)
- `user_data` (String)
- `user_managed` (Boolean)
- `vgpus` (List of Object) List of virtual GPUs (see [below for nested schema](#nestedatt--vgpus))
- `vgpus` (List of Number)
- `virtual_image_id` (Number)
- `virtual_image_name` (String)
- `vnc_password` (String)
@@ -187,7 +183,7 @@ Read-Only:
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)
@@ -198,7 +194,6 @@ Read-Only:
- `role` (String)
- `sep_id` (Number)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedobjatt--disks--snapshots))
@@ -337,29 +332,3 @@ Read-Only:
- `key` (String)
- `val` (String)
<a id="nestedatt--vgpus"></a>
### Nested Schema for `vgpus`
Read-Only:
- `account_id` (Number)
- `bus_number` (Number)
- `created_time` (Number)
- `deleted_time` (Number)
- `gid` (Number)
- `guid` (Number)
- `id` (Number)
- `last_claimed_by` (Number)
- `last_update_time` (Number)
- `mode` (String)
- `pci_slot` (Number)
- `pgpuid` (Number)
- `profile_id` (Number)
- `ram` (Number)
- `reference_id` (String)
- `rg_id` (Number)
- `status` (String)
- `type` (String)
- `vmid` (Number)

View File

@@ -33,7 +33,6 @@ description: |-
- `size` (Number)
- `sort_by` (String) sort by one of supported fields, format +|-(field)
- `stack_id` (Number) Find by stack ID
- `stack_name` (String) Find by node name.
- `status` (String) Find by status
- `tech_status` (String) Find by tech status
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
@@ -68,7 +67,6 @@ Read-Only:
- `arch` (String)
- `auto_start_w_node` (Boolean)
- `boot_order` (List of String)
- `boot_type` (String)
- `bootdisk_size` (Number)
- `cd_image_id` (Number)
- `chipset` (String)
@@ -89,11 +87,9 @@ Read-Only:
- `driver` (String)
- `gid` (Number)
- `guid` (Number)
- `hot_resize` (Boolean)
- `hp_backed` (Boolean)
- `image_id` (Number)
- `interfaces` (List of Object) (see [below for nested schema](#nestedobjatt--items--interfaces))
- `loader_type` (String)
- `lock_status` (String)
- `manager_id` (Number)
- `manager_type` (String)
@@ -101,12 +97,10 @@ Read-Only:
- `milestones` (Number)
- `name` (String)
- `need_reboot` (Boolean)
- `network_interface_naming` (String)
- `nid` (Number)
- `numa_affinity` (String)
- `numa_node_id` (Number)
- `os_users` (List of Object) (see [below for nested schema](#nestedobjatt--items--os_users))
- `pinned` (Number)
- `pinned` (Boolean)
- `preferred_cpu` (List of Number)
- `ram` (Number)
- `reference_id` (String)
@@ -117,7 +111,6 @@ Read-Only:
- `rg_name` (String)
- `snap_sets` (List of Object) (see [below for nested schema](#nestedobjatt--items--snap_sets))
- `stack_id` (Number)
- `stack_name` (String)
- `stateless_sep_id` (Number)
- `stateless_sep_type` (String)
- `status` (String)

View File

@@ -62,10 +62,8 @@ Read-Only:
- `arch` (String)
- `auto_start_w_node` (Boolean)
- `boot_order` (List of String)
- `boot_type` (String)
- `bootdisk_size` (Number)
- `cd_image_id` (Number)
- `chipset` (String)
- `clone_reference` (Number)
- `clones` (List of Number)
- `compute_id` (Number)
@@ -83,11 +81,9 @@ Read-Only:
- `driver` (String)
- `gid` (Number)
- `guid` (Number)
- `hot_resize` (Boolean)
- `hp_backed` (Boolean)
- `image_id` (Number)
- `interfaces` (List of Object) (see [below for nested schema](#nestedobjatt--items--interfaces))
- `loader_type` (String)
- `lock_status` (String)
- `manager_id` (Number)
- `manager_type` (String)
@@ -95,11 +91,10 @@ Read-Only:
- `milestones` (Number)
- `name` (String)
- `need_reboot` (Boolean)
- `network_interface_naming` (String)
- `numa_affinity` (String)
- `numa_node_id` (Number)
- `os_users` (List of Object) (see [below for nested schema](#nestedobjatt--items--os_users))
- `pinned` (Number)
- `pinned` (Boolean)
- `preferred_cpu` (List of Number)
- `ram` (Number)
- `reference_id` (String)
@@ -110,7 +105,6 @@ Read-Only:
- `rg_name` (String)
- `snap_sets` (List of Object) (see [below for nested schema](#nestedobjatt--items--snap_sets))
- `stack_id` (Number)
- `stack_name` (String)
- `stateless_sep_id` (Number)
- `stateless_sep_type` (String)
- `status` (String)
@@ -178,7 +172,6 @@ Read-Only:
Read-Only:
- `bus_number` (Number)
- `conn_id` (Number)
- `conn_type` (String)
- `def_gw` (String)
@@ -186,10 +179,8 @@ Read-Only:
- `flip_group_id` (Number)
- `guid` (String)
- `ip_address` (String)
- `libvirt_settings` (List of Object) (see [below for nested schema](#nestedobjatt--items--interfaces--libvirt_settings))
- `listen_ssh` (Boolean)
- `mac` (String)
- `mtu` (Number)
- `name` (String)
- `net_id` (Number)
- `net_type` (String)
@@ -201,20 +192,6 @@ Read-Only:
- `type` (String)
- `vnfs` (List of Number)
<a id="nestedobjatt--items--interfaces--libvirt_settings"></a>
### Nested Schema for `items.interfaces.libvirt_settings`
Read-Only:
- `event_idx` (String)
- `guid` (String)
- `ioeventfd` (String)
- `queues` (Number)
- `rx_queue_size` (Number)
- `tx_queue_size` (Number)
- `txmode` (String)
<a id="nestedobjatt--items--interfaces--qos"></a>
### Nested Schema for `items.interfaces.qos`

View File

@@ -46,6 +46,7 @@ description: |-
- `lock_status` (String)
- `milestones` (Number)
- `name` (String)
- `register_computes` (Boolean)
- `resource_limits` (List of Object) (see [below for nested schema](#nestedatt--resource_limits))
- `resource_types` (List of String)
- `secret` (String)

View File

@@ -70,6 +70,7 @@ Read-Only:
- `lock_status` (String)
- `milestones` (Number)
- `name` (String)
- `register_computes` (Boolean)
- `resource_limits` (List of Object) (see [below for nested schema](#nestedobjatt--items--resource_limits))
- `resource_types` (List of String)
- `rg_id` (Number)

View File

@@ -68,6 +68,7 @@ Read-Only:
- `lock_status` (String)
- `milestones` (Number)
- `name` (String)
- `register_computes` (Boolean)
- `resource_limits` (List of Object) (see [below for nested schema](#nestedobjatt--items--resource_limits))
- `resource_types` (List of String)
- `rg_id` (Number)

View File

@@ -1,59 +0,0 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "decort_cb_sep_and_pools_available_list Data Source - terraform-provider-decort"
subcategory: ""
description: |-
---
# decort_cb_sep_and_pools_available_list (Data Source)
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `account_id` (Number) Account ID
### Optional
- `rg_id` (Number) Resource group ID
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
### Read-Only
- `entry_count` (Number) Number of available SEP entries
- `id` (String) The ID of this resource.
- `items` (List of Object) List of available SEPs (see [below for nested schema](#nestedatt--items))
<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Optional:
- `default` (String)
- `read` (String)
<a id="nestedatt--items"></a>
### Nested Schema for `items`
Read-Only:
- `pools` (List of Object) (see [below for nested schema](#nestedobjatt--items--pools))
- `sep_id` (Number)
- `sep_name` (String)
- `sep_type` (String)
<a id="nestedobjatt--items--pools"></a>
### Nested Schema for `items.pools`
Read-Only:
- `name` (String)
- `system` (Boolean)
- `types` (List of String)

View File

@@ -1,38 +0,0 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "decort_cb_sep_template Data Source - terraform-provider-decort"
subcategory: ""
description: |-
---
# decort_cb_sep_template (Data Source)
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `lang` (String) language
- `sep_type` (String) type of sep
### Optional
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
### Read-Only
- `id` (String) The ID of this resource.
- `sep_template` (String)
<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Optional:
- `default` (String)
- `read` (String)

View File

@@ -27,7 +27,6 @@ description: |-
- `rg_id` (Number) Find by rg id
- `size` (Number) Page size
- `sort_by` (String) sort by one of supported fields, format +|-(field)
- `status` (String) sort by status
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `vnfdev_id` (Number) find by VNF Device id

View File

@@ -29,9 +29,7 @@ description: |-
- `account_name` (String) The name of the subscriber '(account') to whom this disk belongs
- `acl` (String)
- `computes` (List of Object) (see [below for nested schema](#nestedatt--computes))
- `created_by` (String)
- `created_time` (Number) Created time
- `deleted_by` (String)
- `deleted_time` (Number) Deleted time
- `desc` (String) Description of disk
- `destruction_time` (Number) Time of final deletion
@@ -42,15 +40,12 @@ description: |-
- `image_id` (Number) Image ID
- `images` (List of String) IDs of images using the disk
- `iotune` (List of Object) (see [below for nested schema](#nestedatt--iotune))
- `machine_id` (Number)
- `machine_name` (String)
- `milestones` (Number) Milestones
- `order` (Number) Disk order
- `params` (String) Disk params
- `parent_id` (Number) ID of the parent disk
- `pci_slot` (Number) ID of the pci slot to which the disk is connected
- `pool` (String) Pool for disk location
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_time` (Number) Time of the last deletion attempt
- `replication` (List of Object) Replication status (see [below for nested schema](#nestedatt--replication))
- `res_id` (String) Resource ID
@@ -59,15 +54,12 @@ description: |-
- `sep_id` (Number) Storage endpoint provider ID to create disk
- `sep_type` (String) Type SEP. Defines the type of storage system and contains one of the values set in the cloud platform
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number) Size in GB
- `size_used` (Number) Number of used space, in GB
- `snapshots` (List of Object) (see [below for nested schema](#nestedatt--snapshots))
- `status` (String) Disk status
- `tech_status` (String) Technical status of the disk
- `type` (String) The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number) Virtual Machine ID (Deprecated)
<a id="nestedblock--timeouts"></a>

View File

@@ -56,9 +56,7 @@ Read-Only:
- `account_name` (String)
- `acl` (String)
- `computes` (List of Object) (see [below for nested schema](#nestedobjatt--items--computes))
- `created_by` (String)
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `destruction_time` (Number)
@@ -71,13 +69,12 @@ Read-Only:
- `iotune` (List of Object) (see [below for nested schema](#nestedobjatt--items--iotune))
- `machine_id` (Number)
- `machine_name` (String)
- `milestones` (Number)
- `order` (Number)
- `params` (String)
- `parent_id` (Number)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_time` (Number)
- `replication` (List of Object) (see [below for nested schema](#nestedobjatt--items--replication))
- `res_id` (String)
@@ -86,15 +83,12 @@ Read-Only:
- `sep_id` (Number)
- `sep_type` (String)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedobjatt--items--snapshots))
- `status` (String)
- `tech_status` (String)
- `type` (String)
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number)
<a id="nestedobjatt--items--computes"></a>

View File

@@ -53,9 +53,7 @@ Read-Only:
- `account_name` (String)
- `acl` (String)
- `computes` (List of Object) (see [below for nested schema](#nestedobjatt--items--computes))
- `created_by` (String)
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `destruction_time` (Number)
@@ -68,13 +66,12 @@ Read-Only:
- `iotune` (List of Object) (see [below for nested schema](#nestedobjatt--items--iotune))
- `machine_id` (Number)
- `machine_name` (String)
- `milestones` (Number)
- `order` (Number)
- `params` (String)
- `parent_id` (Number)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_time` (Number)
- `replication` (List of Object) (see [below for nested schema](#nestedobjatt--items--replication))
- `res_id` (String)
@@ -83,15 +80,12 @@ Read-Only:
- `sep_id` (Number)
- `sep_type` (String)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedobjatt--items--snapshots))
- `status` (String)
- `tech_status` (String)
- `type` (String)
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number)
<a id="nestedobjatt--items--computes"></a>

View File

@@ -46,7 +46,7 @@ description: |-
- `parent_id` (Number) ID of the parent disk
- `pci_slot` (Number) ID of the pci slot to which the disk is connected
- `pool` (String) Pool for disk location
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_time` (Number) Time of the last deletion attempt
- `replication` (List of Object) Replication status (see [below for nested schema](#nestedatt--replication))
- `res_id` (String) Resource ID

View File

@@ -43,7 +43,6 @@ description: |-
- `net_name` (String)
- `network` (String)
- `network_id` (Number)
- `ntp` (List of String)
- `pre_reservations_num` (Number)
- `prefix` (Number)
- `pri_vnf_dev_id` (Number)

View File

@@ -21,7 +21,6 @@ description: |-
- `by_id` (Number) Find by ID
- `name` (String) Find by name
- `network` (String)
- `ovs_bridge` (String) Name of the openVswitch bridge
- `page` (Number) Page number
- `size` (Number) Page size
- `sort_by` (String) sort by one of supported fields, format +|-(field)

View File

@@ -50,7 +50,7 @@ description: |-
- `network_interface_naming` (String)
- `password` (String)
- `pool_name` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `res_id` (String)
@@ -58,7 +58,6 @@ description: |-
- `sep_id` (Number)
- `shared_with` (List of Number)
- `size` (Number)
- `snapshot_id` (String)
- `status` (String)
- `tech_status` (String)
- `type` (String)

View File

@@ -33,7 +33,6 @@ description: |-
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `desc` (String)
- `extnet_id` (Number) ID of the external network to connect workers to. If omitted network will be chosen by the platfom.
- `id` (String) The ID of this resource.
- `k8s_ci_name` (String)

View File

@@ -35,7 +35,6 @@ description: |-
- `arch` (String)
- `auto_start_w_node` (Boolean)
- `boot_order` (List of String)
- `boot_type` (String)
- `bootdisk_size` (Number)
- `cd_image_id` (Number)
- `chipset` (String)
@@ -55,12 +54,10 @@ description: |-
- `driver` (String)
- `gid` (Number)
- `guid` (Number)
- `hot_resize` (Boolean)
- `hp_backed` (Boolean)
- `id` (String) The ID of this resource.
- `image_id` (Number)
- `interfaces` (List of Object) (see [below for nested schema](#nestedatt--interfaces))
- `loader_type` (String)
- `lock_status` (String)
- `manager_id` (Number)
- `manager_type` (String)
@@ -73,7 +70,6 @@ description: |-
- `natable_vins_network` (String)
- `natable_vins_network_name` (String)
- `need_reboot` (Boolean)
- `network_interface_naming` (String)
- `numa_affinity` (String)
- `numa_node_id` (Number)
- `os_users` (List of Object) (see [below for nested schema](#nestedatt--os_users))
@@ -97,7 +93,7 @@ description: |-
- `updated_time` (Number)
- `user_managed` (Boolean)
- `userdata` (String)
- `vgpus` (List of Object) List of virtual GPUs (see [below for nested schema](#nestedatt--vgpus))
- `vgpus` (List of Number)
- `virtual_image_id` (Number)
- `virtual_image_name` (String)
- `vnc_password` (String)
@@ -218,7 +214,7 @@ Read-Only:
- `passwd` (String)
- `pci_slot` (Number)
- `pool` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_time` (Number)
- `reality_device_number` (Number)
- `replication` (List of Object) (see [below for nested schema](#nestedobjatt--disks--replication))
@@ -226,7 +222,6 @@ Read-Only:
- `role` (String)
- `sep_id` (Number)
- `shareable` (Boolean)
- `size_available` (Number)
- `size_max` (Number)
- `size_used` (Number)
- `snapshots` (List of Object) (see [below for nested schema](#nestedobjatt--disks--snapshots))
@@ -357,29 +352,3 @@ Read-Only:
- `guid` (String)
- `label` (String)
- `timestamp` (Number)
<a id="nestedatt--vgpus"></a>
### Nested Schema for `vgpus`
Read-Only:
- `account_id` (Number)
- `bus_number` (Number)
- `created_time` (Number)
- `deleted_time` (Number)
- `gid` (Number)
- `guid` (Number)
- `id` (Number)
- `last_claimed_by` (Number)
- `last_update_time` (Number)
- `mode` (String)
- `pci_slot` (Number)
- `pgpuid` (Number)
- `profile_id` (Number)
- `ram` (Number)
- `reference_id` (String)
- `rg_id` (Number)
- `status` (String)
- `type` (String)
- `vmid` (Number)

View File

@@ -64,7 +64,6 @@ Read-Only:
- `arch` (String)
- `auto_start_w_node` (Boolean)
- `boot_order` (List of String)
- `boot_type` (String)
- `bootdisk_size` (Number)
- `cd_image_id` (Number)
- `chipset` (String)
@@ -85,11 +84,9 @@ Read-Only:
- `driver` (String)
- `gid` (Number)
- `guid` (Number)
- `hot_resize` (Boolean)
- `hp_backed` (Boolean)
- `image_id` (Number)
- `interfaces` (List of Object) (see [below for nested schema](#nestedobjatt--items--interfaces))
- `loader_type` (String)
- `lock_status` (String)
- `manager_id` (Number)
- `manager_type` (String)
@@ -97,7 +94,6 @@ Read-Only:
- `milestones` (Number)
- `name` (String)
- `need_reboot` (Boolean)
- `network_interface_naming` (String)
- `numa_affinity` (String)
- `numa_node_id` (Number)
- `pinned` (Boolean)

View File

@@ -62,7 +62,6 @@ Read-Only:
- `arch` (String)
- `auto_start_w_node` (Boolean)
- `boot_order` (List of String)
- `boot_type` (String)
- `bootdisk_size` (Number)
- `cd_image_id` (Number)
- `chipset` (String)
@@ -83,11 +82,9 @@ Read-Only:
- `driver` (String)
- `gid` (Number)
- `guid` (Number)
- `hot_resize` (Boolean)
- `hp_backed` (Boolean)
- `image_id` (Number)
- `interfaces` (List of Object) (see [below for nested schema](#nestedobjatt--items--interfaces))
- `loader_type` (String)
- `lock_status` (String)
- `manager_id` (Number)
- `manager_type` (String)
@@ -95,7 +92,6 @@ Read-Only:
- `milestones` (Number)
- `name` (String)
- `need_reboot` (Boolean)
- `network_interface_naming` (String)
- `numa_affinity` (String)
- `numa_node_id` (Number)
- `pinned` (Boolean)

View File

@@ -55,4 +55,3 @@ Read-Only:
- `location_code` (String)
- `meta` (List of String)
- `name` (String)
- `sdn_support` (Boolean)

View File

@@ -46,6 +46,7 @@ description: |-
- `lock_status` (String)
- `milestones` (Number)
- `name` (String)
- `register_computes` (Boolean)
- `res_types` (List of String)
- `resource_limits` (List of Object) (see [below for nested schema](#nestedatt--resource_limits))
- `secret` (String)

View File

@@ -70,6 +70,7 @@ Read-Only:
- `lock_status` (String)
- `milestones` (Number)
- `name` (String)
- `register_computes` (Boolean)
- `resource_limits` (List of Object) (see [below for nested schema](#nestedobjatt--items--resource_limits))
- `resource_types` (List of String)
- `rg_id` (Number)

View File

@@ -68,6 +68,7 @@ Read-Only:
- `lock_status` (String)
- `milestones` (Number)
- `name` (String)
- `register_computes` (Boolean)
- `resource_limits` (List of Object) (see [below for nested schema](#nestedobjatt--items--resource_limits))
- `resource_types` (List of String)
- `rg_id` (Number)

View File

@@ -1,59 +0,0 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "decort_sep_and_pools_available_list Data Source - terraform-provider-decort"
subcategory: ""
description: |-
---
# decort_sep_and_pools_available_list (Data Source)
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `account_id` (Number) Account ID
### Optional
- `rg_id` (Number) Resource group ID
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
### Read-Only
- `entry_count` (Number) Number of available SEP entries
- `id` (String) The ID of this resource.
- `items` (List of Object) List of available SEPs (see [below for nested schema](#nestedatt--items))
<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Optional:
- `default` (String)
- `read` (String)
<a id="nestedatt--items"></a>
### Nested Schema for `items`
Read-Only:
- `pools` (List of Object) (see [below for nested schema](#nestedobjatt--items--pools))
- `sep_id` (Number)
- `sep_name` (String)
- `sep_type` (String)
<a id="nestedobjatt--items--pools"></a>
### Nested Schema for `items.pools`
Read-Only:
- `name` (String)
- `system` (Boolean)
- `types` (List of String)

View File

@@ -26,7 +26,6 @@ description: |-
- `rg_id` (Number) Filter by RG ID
- `size` (Number) Page size
- `sort_by` (String) sort by one of supported fields, format +|-(field)
- `status` (String) sort by status
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `vnf_dev_id` (Number) Filter by VNF Device id

View File

@@ -18,14 +18,13 @@ description: |-
### Required
- `account_name` (String) account name
- `username` (String) username of owner the account
### Optional
- `desc` (String) description
- `emailaddress` (String) email
- `enable` (Boolean) enable/disable account
- `permanently` (Boolean) whether to completely delete the account
- `reason` (Boolean) reason for deactivation
- `resource_limits` (Block List, Max: 1) (see [below for nested schema](#nestedblock--resource_limits))
- `restore` (Boolean) restore a deleted account
- `send_access_emails` (Boolean) if true send emails when a user is granted access to resources

View File

@@ -28,7 +28,6 @@ description: |-
### Optional
- `chipset` (String)
- `cloud_init` (String) Optional cloud_init parameters. Applied when creating new compute instance only, ignored in all other cases.
- `compgroup_id` (Number)
- `extnets` (List of Number) list of external networks to connect computes to
@@ -84,7 +83,6 @@ Optional:
Read-Only:
- `chipset` (String)
- `id` (Number)
- `ip_addresses` (List of String)
- `name` (String)

View File

@@ -27,11 +27,9 @@ description: |-
- `compute_features` (Set of String)
- `cpu_allocation_parameter` (String) set cpu allocation parameter
- `cpu_allocation_ratio` (Number) set cpu allocation ratio
- `desc` (String) description
- `emailaddress` (String) email
- `enable` (Boolean) enable/disable account
- `permanently` (Boolean) whether to completely delete the account
- `reason` (Boolean) reason for restore or deactivation
- `resource_limits` (Block List, Max: 1) (see [below for nested schema](#nestedblock--resource_limits))
- `restore` (Boolean) restore a deleted account
- `send_access_emails` (Boolean) if true send emails when a user is granted access to resources

View File

@@ -17,6 +17,7 @@ description: |-
### Required
- `gid` (Number) grid (platform) ID where this template should be create in
- `name` (String) Name of the rescue disk
- `url` (String) URL where to download ISO from
@@ -44,7 +45,6 @@ description: |-
- `ckey` (String)
- `deleted_time` (Number)
- `desc` (String)
- `gid` (Number)
- `guid` (Number)
- `history` (List of Object) (see [below for nested schema](#nestedatt--history))
- `id` (String) The ID of this resource.
@@ -54,7 +54,7 @@ description: |-
- `link_to` (Number)
- `meta` (List of String) meta
- `milestones` (Number)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)

View File

@@ -19,7 +19,9 @@ description: |-
- `account_id` (Number)
- `disk_name` (String)
- `gid` (Number)
- `size_max` (Number)
- `type` (String) The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'
### Optional
@@ -33,6 +35,7 @@ description: |-
- `restore` (Boolean) restore deleting disk
- `sep_id` (Number)
- `shareable` (Boolean)
- `ssd_size` (Number)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
### Read-Only
@@ -41,30 +44,25 @@ description: |-
- `acl` (String)
- `boot_partition` (Number)
- `computes` (List of Object) (see [below for nested schema](#nestedatt--computes))
- `created_by` (String)
- `created_time` (Number)
- `deleted_by` (String)
- `deleted_time` (Number)
- `destruction_time` (Number)
- `devicename` (String)
- `disk_id` (Number)
- `disk_path` (String)
- `gid` (Number)
- `guid` (Number)
- `id` (String) The ID of this resource.
- `image_id` (Number)
- `images` (List of String)
- `iqn` (String)
- `login` (String)
- `machine_id` (Number)
- `machine_name` (String)
- `milestones` (Number)
- `order` (Number)
- `params` (String)
- `parent_id` (Number)
- `passwd` (String)
- `pci_slot` (Number)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_attempts` (Number)
- `purge_time` (Number)
- `reality_device_number` (Number)
@@ -78,9 +76,6 @@ description: |-
- `snapshots` (List of Object) (see [below for nested schema](#nestedatt--snapshots))
- `status` (String)
- `tech_status` (String)
- `type` (String) The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number)
<a id="nestedblock--iotune"></a>

View File

@@ -18,6 +18,7 @@ description: |-
### Required
- `boot_type` (String) Boot type of image bios or uefi
- `gid` (Number) grid (platform) ID where this template should be create in
- `image_type` (String) Image type linux, windows or other
- `name` (String) Name of the rescue disk
@@ -51,7 +52,6 @@ description: |-
- `cd_presented_to` (String)
- `deleted_time` (Number)
- `desc` (String)
- `gid` (Number)
- `guid` (Number)
- `history` (List of Object) (see [below for nested schema](#nestedatt--history))
- `id` (String) The ID of this resource.
@@ -59,7 +59,7 @@ description: |-
- `last_modified` (Number)
- `link_to` (Number)
- `milestones` (Number)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)

View File

@@ -19,7 +19,7 @@ description: |-
- `boot_type` (String) Boot type of image BIOS or UEFI
- `compute_id` (Number) Compute Id
- `image_type` (String) Image type linux, windows or unknown
- `image_type` (String) Image type linux, windows or other
- `name` (String) Name of the rescue disk
### Optional
@@ -35,6 +35,7 @@ description: |-
- `network_interface_naming` (String) select a network interface naming pattern for your Linux machine. eth - onboard, ens - pci slot naming
- `password` (String) Optional password for the image
- `pool_name` (String) pool for image create
- `sep_id` (Number) storage endpoint provider ID
- `shared_with` (List of Number)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `username` (String) Optional username for the image
@@ -55,14 +56,13 @@ description: |-
- `last_modified` (Number)
- `link_to` (Number)
- `milestones` (Number)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)
- `res_id` (String)
- `res_name` (String)
- `rescuecd` (Boolean)
- `sep_id` (Number) storage endpoint provider ID
- `size` (Number)
- `snapshot_id` (String) snapshot id
- `status` (String)

View File

@@ -21,7 +21,7 @@ description: |-
- `boot_type` (String) Boot type of image BIOS or UEFI
- `disk_id` (Number) Disk Id
- `drivers` (List of String) List of types of compute suitable for image. Example: [ "KVM_X86" ]
- `image_type` (String) Image type linux, windows or unknown
- `image_type` (String) Image type linux, windows or other
- `name` (String) Name of the rescue disk
### Optional
@@ -37,6 +37,7 @@ description: |-
- `network_interface_naming` (String) select a network interface naming pattern for your Linux machine. eth - onboard, ens - pci slot naming
- `password` (String) Optional password for the image
- `pool_name` (String) pool for image create
- `sep_id` (Number) storage endpoint provider ID
- `shared_with` (List of Number)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `username` (String) Optional username for the image
@@ -55,14 +56,13 @@ description: |-
- `last_modified` (Number)
- `link_to` (Number)
- `milestones` (Number)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)
- `res_id` (String)
- `res_name` (String)
- `rescuecd` (Boolean)
- `sep_id` (Number) storage endpoint provider ID
- `size` (Number)
- `snapshot_id` (String) snapshot id
- `status` (String)

View File

@@ -31,12 +31,12 @@ description: |-
- `anti_affinity_rules` (Block List) (see [below for nested schema](#nestedblock--anti_affinity_rules))
- `auto_start_w_node` (Boolean)
- `boot_disk_size` (Number) This compute instance boot disk size in GB. Make sure it is large enough to accomodate selected OS image.
- `boot_type` (String) Type of image upload.
- `cd` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--cd))
- `chipset` (String) Type of the emulated system.
- `cloud_init` (String) Optional cloud_init parameters. Applied when creating new compute instance only, ignored in all other cases.
- `cpu_pin` (Boolean) Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node.
- `custom_fields` (String)
- `depresent` (Boolean) whether to depresent compute disks from node or not
- `description` (String) Optional text description of this compute instance.
- `detach_disks` (Boolean)
- `disks` (Block List) (see [below for nested schema](#nestedblock--disks))
@@ -45,15 +45,12 @@ description: |-
- `force_pin` (Boolean)
- `force_resize` (Boolean) Flag for resize compute
- `force_stop` (Boolean) Flag for redeploy compute
- `hot_resize` (Boolean) Type of image vm.
- `hp_backed` (Boolean) Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node.
- `image_id` (Number) ID of the OS image to base this compute instance on.
- `ipa_type` (String) compute purpose
- `is` (String) system name
- `libvirt_settings` (Block Set) Configure libvirt virtio interface parameters. You can only delete values locally. Data on the platform cannot be deleted. (see [below for nested schema](#nestedblock--libvirt_settings))
- `loader_type` (String) Type of image vm.
- `network` (Block Set) Optional network connection(s) for this compute. You may specify several network blocks, one for each connection. (see [below for nested schema](#nestedblock--network))
- `network_interface_naming` (String) Name of netfowrk interface.
- `network` (Block Set, Max: 8) Optional network connection(s) for this compute. You may specify several network blocks, one for each connection. (see [below for nested schema](#nestedblock--network))
- `numa_affinity` (String) Rule for VM placement with NUMA affinity.
- `pause` (Boolean)
- `pci_devices` (Set of Number) ID of the connected pci devices
@@ -112,7 +109,7 @@ description: |-
- `need_reboot` (Boolean)
- `numa_node_id` (Number)
- `os_users` (List of Object) Guest OS users provisioned on this compute instance. (see [below for nested schema](#nestedatt--os_users))
- `pinned` (Number)
- `pinned` (Boolean)
- `reference_id` (String)
- `registered` (Boolean)
- `res_name` (String)
@@ -127,7 +124,7 @@ description: |-
- `updated_by` (String)
- `updated_time` (Number)
- `user_managed` (Boolean)
- `vgpus` (List of Object) List of virtual GPUs (see [below for nested schema](#nestedatt--vgpus))
- `vgpus` (List of Number)
- `virtual_image_id` (Number)
- `virtual_image_name` (String)
- `vnc_password` (String)
@@ -191,7 +188,6 @@ Optional:
Read-Only:
- `disk_id` (Number) Disk ID
- `present_to` (Map of Number)
- `shareable` (Boolean)
- `size_max` (Number)
- `size_used` (Number)
@@ -226,10 +222,13 @@ Required:
Optional:
- `ip_address` (String) Optional IP address to assign to this connection. This IP should belong to the selected network and free for use.
- `mac` (String) MAC address associated with this connection. MAC address is assigned automatically.
- `mtu` (Number) Maximum transmission unit, used only for DPDK type, must be 1-9216
- `weight` (Number) weight the network if you need to sort network list, the smallest attach first. zero or null weight attach last
Read-Only:
- `mac` (String) MAC address associated with this connection. MAC address is assigned automatically.
<a id="nestedblock--port_forwarding"></a>
### Nested Schema for `port_forwarding`
@@ -382,29 +381,3 @@ Read-Only:
- `guid` (String)
- `label` (String)
- `timestamp` (Number)
<a id="nestedatt--vgpus"></a>
### Nested Schema for `vgpus`
Read-Only:
- `account_id` (Number)
- `bus_number` (Number)
- `created_time` (Number)
- `deleted_time` (Number)
- `gid` (Number)
- `guid` (Number)
- `id` (Number)
- `last_claimed_by` (Number)
- `last_update_time` (Number)
- `mode` (String)
- `pci_slot` (Number)
- `pgpuid` (Number)
- `profile_id` (Number)
- `ram` (Number)
- `reference_id` (String)
- `rg_id` (Number)
- `status` (String)
- `type` (String)
- `vmid` (Number)

View File

@@ -37,6 +37,7 @@ description: |-
- `ipcidr` (String) Address of the netowrk inside the private network segment (aka ViNS) if def_net_type=PRIVATE
- `owner` (String) username - owner of this RG. Leave blank to set current user as owner
- `permanently` (Boolean) flag to permanently delete resource group
- `register_computes` (Boolean) Register computes in registration system
- `resource_limits` (Block List, Max: 1) (see [below for nested schema](#nestedblock--resource_limits))
- `restore` (Boolean) restore deleted rg
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

View File

@@ -52,7 +52,7 @@ description: |-
- `meta` (List of String) meta
- `milestones` (Number)
- `pool_name` (String) pool for image create
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `reference_id` (String)

View File

@@ -19,6 +19,7 @@ description: |-
- `account_id` (Number) The unique ID of the subscriber-owner of the disk
- `disk_name` (String) Name of disk
- `gid` (Number) ID of the grid (platform)
- `size_max` (Number) Size in GB
### Optional
@@ -31,30 +32,26 @@ description: |-
- `sep_id` (Number) Storage endpoint provider ID to create disk
- `shareable` (Boolean)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `type` (String) The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'
### Read-Only
- `account_name` (String) The name of the subscriber '(account') to whom this disk belongs
- `acl` (String)
- `computes` (List of Object) (see [below for nested schema](#nestedatt--computes))
- `created_by` (String)
- `created_time` (Number) Created time
- `deleted_by` (String)
- `deleted_time` (Number) Deleted time
- `destruction_time` (Number) Time of final deletion
- `devicename` (String) Name of the device
- `disk_id` (Number) Disk ID. Duplicates the value of the ID parameter
- `gid` (Number) ID of the grid (platform)
- `id` (String) The ID of this resource.
- `image_id` (Number) Image ID
- `images` (List of String) IDs of images using the disk
- `machine_id` (Number)
- `machine_name` (String)
- `order` (Number) Disk order
- `params` (String) Disk params
- `parent_id` (Number) ID of the parent disk
- `pci_slot` (Number) ID of the pci slot to which the disk is connected
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `purge_time` (Number) Time of the last deletion attempt
- `replication` (List of Object) Replication status (see [below for nested schema](#nestedatt--replication))
- `res_id` (String) Resource ID
@@ -65,9 +62,6 @@ description: |-
- `snapshots` (List of Object) (see [below for nested schema](#nestedatt--snapshots))
- `status` (String) Disk status
- `tech_status` (String) Technical status of the disk
- `type` (String) The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'
- `updated_by` (String)
- `updated_time` (Number)
- `vmid` (Number) Virtual Machine ID (Deprecated)
<a id="nestedblock--iotune"></a>

View File

@@ -21,7 +21,7 @@ description: |-
- `boot_type` (String) Boot type of image bios or uefi
- `drivers` (List of String)
- `name` (String) Name of the rescue disk
- `type` (String) Image type linux, windows or unknown
- `type` (String) Image type linux, windows or other
- `url` (String) URL where to download media from
### Optional
@@ -56,14 +56,13 @@ description: |-
- `last_modified` (Number)
- `link_to` (Number)
- `milestones` (Number)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `res_id` (String)
- `rescuecd` (Boolean)
- `shared_with` (List of Number)
- `size` (Number)
- `snapshot_id` (String)
- `status` (String)
- `tech_status` (String)
- `unc_path` (String)

View File

@@ -20,7 +20,7 @@ description: |-
- `boot_type` (String) Boot type of image BIOS or UEFI
- `compute_id` (Number) Compute Id
- `name` (String) Name of the rescue disk
- `type` (String) Image type linux, windows or unknown
- `type` (String) Image type linux, windows or other
### Optional
@@ -29,6 +29,7 @@ description: |-
- `hot_resize` (Boolean) Does this machine supports hot resize
- `password` (String) Optional password for the image
- `pool_name` (String) pool for image create
- `sep_id` (Number) storage endpoint provider ID
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `username` (String) Optional username for the image
@@ -54,15 +55,13 @@ description: |-
- `link_to` (Number)
- `milestones` (Number)
- `network_interface_naming` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `res_id` (String)
- `rescuecd` (Boolean)
- `sep_id` (Number) storage endpoint provider ID
- `shared_with` (List of Number)
- `size` (Number)
- `snapshot_id` (String)
- `status` (String)
- `tech_status` (String)
- `unc_path` (String)

View File

@@ -22,7 +22,7 @@ description: |-
- `disk_id` (Number) Disk Id
- `drivers` (List of String) List of types of compute suitable for image. Example: [ "KVM_X86" ]
- `name` (String) Name of the rescue disk
- `type` (String) Image type linux, windows or unknown
- `type` (String) Image type linux, windows or other
### Optional
@@ -32,6 +32,7 @@ description: |-
- `hot_resize` (Boolean) Does this machine supports hot resize
- `password` (String) Optional password for the image
- `pool_name` (String) pool for image create
- `sep_id` (Number) storage endpoint provider ID
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `username` (String) Optional username for the image
@@ -54,15 +55,13 @@ description: |-
- `link_to` (Number)
- `milestones` (Number)
- `network_interface_naming` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `res_id` (String)
- `rescuecd` (Boolean)
- `sep_id` (Number) storage endpoint provider ID
- `shared_with` (List of Number)
- `size` (Number)
- `snapshot_id` (String)
- `status` (String)
- `tech_status` (String)
- `unc_path` (String)

View File

@@ -50,7 +50,7 @@ description: |-
- `network_interface_naming` (String)
- `password` (String)
- `pool_name` (String)
- `present_to` (Map of Number)
- `present_to` (List of Number)
- `provider_name` (String)
- `purge_attempts` (Number)
- `res_id` (String)
@@ -58,7 +58,6 @@ description: |-
- `sep_id` (Number)
- `shared_with` (List of Number)
- `size` (Number)
- `snapshot_id` (String)
- `status` (String)
- `tech_status` (String)
- `type` (String)

View File

@@ -30,7 +30,6 @@ description: |-
- `anti_affinity_rules` (Block List) (see [below for nested schema](#nestedblock--anti_affinity_rules))
- `auto_start_w_node` (Boolean) Flag for start compute after node exits from MAINTENANCE state
- `boot_disk_size` (Number) This compute instance boot disk size in GB. Make sure it is large enough to accomodate selected OS image.
- `boot_type` (String) Type of image upload.
- `cd` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--cd))
- `chipset` (String) Type of the emulated system.
- `cloud_init` (String) Optional cloud_init parameters. Applied when creating new compute instance only, ignored in all other cases.
@@ -43,14 +42,11 @@ description: |-
- `extra_disks` (Set of Number) Optional list of IDs of extra disks to attach to this compute. You may specify several extra disks.
- `force_resize` (Boolean) Flag for resize compute
- `force_stop` (Boolean) Flag for redeploy compute
- `hot_resize` (Boolean) Type of image vm.
- `hp_backed` (Boolean) Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node.
- `image_id` (Number) ID of the OS image to base this compute instance on.
- `ipa_type` (String) compute purpose
- `is` (String) system name
- `loader_type` (String) Type of image vm.
- `network` (Block Set) Optional network connection(s) for this compute. You may specify several network blocks, one for each connection. (see [below for nested schema](#nestedblock--network))
- `network_interface_naming` (String) Name of netfowrk interface.
- `network` (Block Set, Max: 8) Optional network connection(s) for this compute. You may specify several network blocks, one for each connection. (see [below for nested schema](#nestedblock--network))
- `numa_affinity` (String) Rule for VM placement with NUMA affinity.
- `pause` (Boolean)
- `pci_devices` (Set of Number) ID of the connected pci devices
@@ -122,7 +118,7 @@ description: |-
- `updated_by` (String)
- `updated_time` (Number)
- `user_managed` (Boolean)
- `vgpus` (List of Object) List of virtual GPUs (see [below for nested schema](#nestedatt--vgpus))
- `vgpus` (List of Number)
- `virtual_image_id` (Number)
- `virtual_image_name` (String)
- `vnc_password` (String)
@@ -185,7 +181,6 @@ Optional:
Read-Only:
- `disk_id` (Number) Disk ID
- `present_to` (Map of Number)
- `shareable` (Boolean)
- `size_max` (Number)
- `size_used` (Number)
@@ -202,10 +197,13 @@ Required:
Optional:
- `ip_address` (String) Optional IP address to assign to this connection. This IP should belong to the selected network and free for use.
- `mac` (String) MAC address associated with this connection. MAC address is assigned automatically.
- `mtu` (Number) Maximum transmission unit, used only for DPDK type, must be 1-9216
- `weight` (Number) weight the network if you need to sort network list, the smallest attach first. zero or null weight attach last
Read-Only:
- `mac` (String) MAC address associated with this connection. MAC address is assigned automatically.
<a id="nestedblock--port_forwarding"></a>
### Nested Schema for `port_forwarding`
@@ -279,7 +277,6 @@ Read-Only:
- `image_id` (Number)
- `permanently` (Boolean)
- `pool` (String)
- `present_to` (Map of Number)
- `sep_id` (Number)
- `shareable` (Boolean)
- `size` (Number)
@@ -361,29 +358,3 @@ Read-Only:
- `guid` (String)
- `label` (String)
- `timestamp` (Number)
<a id="nestedatt--vgpus"></a>
### Nested Schema for `vgpus`
Read-Only:
- `account_id` (Number)
- `bus_number` (Number)
- `created_time` (Number)
- `deleted_time` (Number)
- `gid` (Number)
- `guid` (Number)
- `id` (Number)
- `last_claimed_by` (Number)
- `last_update_time` (Number)
- `mode` (String)
- `pci_slot` (Number)
- `pgpuid` (Number)
- `profile_id` (Number)
- `ram` (Number)
- `reference_id` (String)
- `rg_id` (Number)
- `status` (String)
- `type` (String)
- `vmid` (Number)

View File

@@ -35,6 +35,7 @@ description: |-
- `owner` (String)
- `permanently` (Boolean) Set to True if you want force delete non-empty RG
- `quota` (Block List, Max: 1) Quota settings for this resource group. (see [below for nested schema](#nestedblock--quota))
- `register_computes` (Boolean) Register computes in registration system
- `restore` (Boolean)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `uniq_pools` (List of String)

2
go.mod
View File

@@ -8,7 +8,7 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
github.com/sirupsen/logrus v1.9.0
golang.org/x/net v0.23.0
repository.basistech.ru/BASIS/decort-golang-sdk v1.11.4
repository.basistech.ru/BASIS/decort-golang-sdk v1.10.2
)
require (

4
go.sum
View File

@@ -273,5 +273,5 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
repository.basistech.ru/BASIS/decort-golang-sdk v1.11.4 h1:OEFgSEGjzut+vVMGeNgoNq3dtk63FbXB6yGLTywtAas=
repository.basistech.ru/BASIS/decort-golang-sdk v1.11.4/go.mod h1:OaUynHHuSjWMzpfyoL4au6oLcUogqUkPPBKA15pbHWo=
repository.basistech.ru/BASIS/decort-golang-sdk v1.10.2 h1:sA/ZngL4xvkyz8lVGkqbi2RBi4CrHJjho2WV21KX918=
repository.basistech.ru/BASIS/decort-golang-sdk v1.10.2/go.mod h1:OaUynHHuSjWMzpfyoL4au6oLcUogqUkPPBKA15pbHWo=

View File

@@ -55,7 +55,6 @@ import (
cb_node "repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/node"
cb_pcidevice "repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/pcidevice"
cb_rg "repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/rg"
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/sep"
cb_sep "repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/sep"
cb_stack "repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/stack"
cb_user "repository.basistech.ru/BASIS/terraform-provider-decort/internal/service/cloudbroker/user"
@@ -160,7 +159,6 @@ func newDataSourcesMap() map[string]*schema.Resource {
"decort_k8s_wg_cloud_init": k8s.DataSourceK8sWgCloudInit(),
"decort_rg_resource_consumption_list": rg.DataSourceRGResourceConsumptionList(),
"decort_rg_resource_consumption_get": rg.DataSourceRGResourceConsumptionGet(),
"decort_sep_and_pools_available_list": sep.DataSourceAvailableSEPAndPoolsList(),
"decort_cb_account": cb_account.DataSourceAccount(),
"decort_cb_account_list": cb_account.DataSourceAccountList(),
@@ -243,12 +241,10 @@ func newDataSourcesMap() map[string]*schema.Resource {
"decort_cb_rg_usage": cb_rg.DataSourceRgUsage(),
"decort_cb_sep_list": cb_sep.DataSourceSepList(),
"decort_cb_sep": cb_sep.DataSourceSep(),
"decort_cb_sep_and_pools_available_list": cb_sep.DataSourceAvailableSEPAndPoolsList(),
"decort_cb_sep_consumption": cb_sep.DataSourceSepConsumption(),
"decort_cb_sep_disk_list": cb_sep.DataSourceSepDiskList(),
"decort_cb_sep_config": cb_sep.DataSourceSepConfig(),
"decort_cb_sep_pool": cb_sep.DataSourceSepPool(),
"decort_cb_sep_template": cb_sep.DataSourceSepTemplate(),
"decort_cb_lb": cb_lb.DataSourceLB(),
"decort_cb_lb_list": cb_lb.DataSourceLBList(),
"decort_cb_lb_list_deleted": cb_lb.DataSourceLBListDeleted(),

View File

@@ -326,10 +326,6 @@ func dataSourceAccountSchemaMake() map[string]*schema.Schema {
Type: schema.TypeFloat,
Computed: true,
},
"desc": {
Type: schema.TypeString,
Computed: true,
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,

View File

@@ -49,7 +49,6 @@ func flattenAccountList(al *account.ListAccounts) []map[string]interface{} {
"acl": flattenRgAcl(acc.ACL),
"compute_features": acc.ComputeFeatures,
"created_time": acc.CreatedTime,
"desc": acc.Description,
"deleted_time": acc.DeletedTime,
"account_id": acc.ID,
"account_name": acc.Name,
@@ -177,10 +176,6 @@ func dataSourceAccountListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"desc": {
Type: schema.TypeString,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,

View File

@@ -50,7 +50,6 @@ func flattenAccountRGList(argl *account.ListRG) []map[string]interface{} {
"resources": flattenAccRGResources(arg.Resources),
"created_by": arg.CreatedBy,
"created_time": arg.CreatedTime,
"desc": arg.Description,
"deleted_by": arg.DeletedBy,
"deleted_time": arg.DeletedTime,
"rg_id": arg.RGID,
@@ -315,10 +314,6 @@ func dataSourceAccountRGListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"desc": {
Type: schema.TypeString,
Computed: true,
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,

View File

@@ -7,7 +7,6 @@ import (
func flattenAccount(d *schema.ResourceData, acc account.RecordAccount) error {
d.Set("dc_location", acc.DCLocation)
d.Set("desc", acc.Description)
// d.Set("resources", flattenAccResources(acc.Resources))
d.Set("ckey", acc.CKey)
d.Set("acl", flattenAccAcl(acc.ACL))
@@ -17,7 +16,6 @@ func flattenAccount(d *schema.ResourceData, acc account.RecordAccount) error {
d.Set("created_by", acc.CreatedBy)
d.Set("created_time", acc.CreatedTime)
d.Set("deactivation_time", acc.DeactivationTime)
d.Set("desc", acc.Description)
d.Set("deleted_by", acc.DeletedBy)
d.Set("deleted_time", acc.DeletedTime)
d.Set("displayname", acc.DisplayName)

View File

@@ -176,7 +176,6 @@ func resourceAccountUpdate(ctx context.Context, d *schema.ResourceData, m interf
if d.HasChange("enable") {
reqSwitch := account.DisableEnableRequest{
AccountID: accountId,
Reason: d.Get("reason").(string),
}
enable := d.Get("enable").(bool)
@@ -208,11 +207,6 @@ func resourceAccountUpdate(ctx context.Context, d *schema.ResourceData, m interf
updated = true
}
if d.HasChange("desc") {
req.Description = d.Get("desc").(string)
updated = true
}
if d.HasChange("resource_limits") {
resLimit := d.Get("resource_limits").([]interface{})[0]
resLimitConv := resLimit.(map[string]interface{})
@@ -400,10 +394,10 @@ func resourceAccountSchemaMake() map[string]*schema.Schema {
Required: true,
Description: "account name",
},
"desc": {
"username": {
Type: schema.TypeString,
Optional: true,
Description: "description",
Required: true,
Description: "username of owner the account",
},
"emailaddress": {
Type: schema.TypeString,
@@ -431,11 +425,6 @@ func resourceAccountSchemaMake() map[string]*schema.Schema {
},
},
},
"reason": {
Type: schema.TypeBool,
Optional: true,
Description: "reason for deactivation",
},
"restore": {
Type: schema.TypeBool,
Optional: true,

View File

@@ -105,7 +105,6 @@ func flattenBSGroupComputes(bsgcs bservice.ListGroupComputes) []map[string]inter
"ip_addresses": bsgc.IPAddresses,
"name": bsgc.Name,
"os_users": flattenBSGroupOSUsers(bsgc.OSUsers),
"chipset": bsgc.Chipset,
}
res = append(res, temp)
}
@@ -150,10 +149,6 @@ func dataSourceBasicServiceGroupSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"chipset": {
Type: schema.TypeString,
Computed: true,
},
"os_users": {
Type: schema.TypeList,
Computed: true,

View File

@@ -100,10 +100,6 @@ func resourceBasicServiceGroupCreate(ctx context.Context, d *schema.ResourceData
req.ExtNets = res
}
if chipset, ok := d.GetOk("chipset"); ok {
req.Chipset = chipset.(string)
}
compgroupId, err := c.CloudAPI().BService().GroupAdd(ctx, req)
if err != nil {
return diag.FromErr(err)
@@ -176,7 +172,6 @@ func resourceBasicServiceGroupUpdate(ctx context.Context, d *schema.ResourceData
ServiceID: uint64(d.Get("service_id").(int)),
CompGroupID: uint64(d.Get("compgroup_id").(int)),
Count: int64(d.Get("comp_count").(int)),
Chipset: d.Get("chipset").(string),
Mode: d.Get("mode").(string),
}
@@ -419,12 +414,6 @@ func resourceBasicServiceGroupSchemaMake() map[string]*schema.Schema {
Optional: true,
Description: "Optional cloud_init parameters. Applied when creating new compute instance only, ignored in all other cases.",
},
"chipset": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"i440fx", "Q35"}, false),
Default: "i440fx",
},
///
"role": {
Type: schema.TypeString,
@@ -514,10 +503,6 @@ func resourceBasicServiceGroupSchemaMake() map[string]*schema.Schema {
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"chipset": {
Type: schema.TypeString,
Computed: true,
},
"id": {
Type: schema.TypeInt,
Computed: true,

View File

@@ -101,19 +101,11 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema {
},
},
},
"created_by": {
Type: schema.TypeString,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
Description: "Created time",
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,
@@ -245,24 +237,16 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema {
// Computed: true,
// Description: "Login to access the disk",
// },
"milestones": {
Type: schema.TypeInt,
Computed: true,
Description: "Milestones",
},
// "milestones": {
// Type: schema.TypeInt,
// Computed: true,
// Description: "Milestones",
// },
"disk_name": {
Type: schema.TypeString,
Computed: true,
Description: "Name of disk",
},
"machine_id": {
Type: schema.TypeInt,
Computed: true,
},
"machine_name": {
Type: schema.TypeString,
Computed: true,
},
"order": {
Type: schema.TypeInt,
Computed: true,
@@ -294,7 +278,7 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema {
Description: "Pool for disk location",
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -316,27 +300,27 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"disk_id": {
Type: schema.TypeInt,
Type: schema.TypeInt,
Computed: true,
},
"pool_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"role": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"self_volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"storage_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
},
@@ -382,10 +366,6 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema {
Type: schema.TypeBool,
Computed: true,
},
"size_available": {
Type: schema.TypeFloat,
Computed: true,
},
"size_max": {
Type: schema.TypeInt,
Computed: true,
@@ -454,14 +434,6 @@ func dataSourceDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Virtual Machine ID (Deprecated)",
},
"updated_by": {
Type: schema.TypeString,
Computed: true,
},
"updated_time": {
Type: schema.TypeInt,
Computed: true,
},
}
return rets

View File

@@ -163,10 +163,6 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema {
},
},
},
"created_by": {
Type: schema.TypeString,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
@@ -318,15 +314,11 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Machine name",
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,
},
"milestones": {
Type: schema.TypeInt,
Computed: true,
Description: "Milestones",
},
// "milestones": {
// Type: schema.TypeInt,
// Computed: true,
// Description: "Milestones",
// },
"disk_name": {
Type: schema.TypeString,
Computed: true,
@@ -363,7 +355,7 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema {
Description: "Pool for disk location",
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -395,27 +387,27 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"disk_id": {
Type: schema.TypeInt,
Type: schema.TypeInt,
Computed: true,
},
"pool_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"role": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"self_volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"storage_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
},
@@ -451,10 +443,6 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeBool,
Computed: true,
},
"size_available": {
Type: schema.TypeFloat,
Computed: true,
},
"size_max": {
Type: schema.TypeInt,
Computed: true,
@@ -523,14 +511,6 @@ func dataSourceDiskListSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Virtual Machine ID (Deprecated)",
},
"updated_by": {
Type: schema.TypeString,
Computed: true,
},
"updated_time": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},

View File

@@ -303,7 +303,7 @@ func dataSourceDiskReplicationSchemaMake() map[string]*schema.Schema {
Description: "Pool for disk location",
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -325,27 +325,27 @@ func dataSourceDiskReplicationSchemaMake() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"disk_id": {
Type: schema.TypeInt,
Type: schema.TypeInt,
Computed: true,
},
"pool_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"role": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"self_volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"storage_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
},

View File

@@ -149,19 +149,11 @@ func dataSourceDiskDeletedListSchemaMake() map[string]*schema.Schema {
},
},
},
"created_by": {
Type: schema.TypeString,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
Description: "Created time",
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,
@@ -308,11 +300,11 @@ func dataSourceDiskDeletedListSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Machine name",
},
"milestones": {
Type: schema.TypeInt,
Computed: true,
Description: "Milestones",
},
// "milestones": {
// Type: schema.TypeInt,
// Computed: true,
// Description: "Milestones",
// },
"disk_name": {
Type: schema.TypeString,
Computed: true,
@@ -349,7 +341,7 @@ func dataSourceDiskDeletedListSchemaMake() map[string]*schema.Schema {
Description: "Pool for disk location",
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -371,27 +363,27 @@ func dataSourceDiskDeletedListSchemaMake() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"disk_id": {
Type: schema.TypeInt,
Type: schema.TypeInt,
Computed: true,
},
"pool_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"role": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"self_volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"storage_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
},
@@ -437,10 +429,6 @@ func dataSourceDiskDeletedListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeBool,
Computed: true,
},
"size_available": {
Type: schema.TypeFloat,
Computed: true,
},
"size_max": {
Type: schema.TypeInt,
Computed: true,
@@ -509,14 +497,6 @@ func dataSourceDiskDeletedListSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Virtual Machine ID (Deprecated)",
},
"updated_by": {
Type: schema.TypeString,
Computed: true,
},
"updated_time": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},

View File

@@ -77,9 +77,7 @@ func flattenDisk(d *schema.ResourceData, disk *disks.RecordDisk) {
d.Set("acl", string(diskAcl))
// d.Set("boot_partition", disk.BootPartition)
d.Set("computes", flattenDiskComputes(disk.Computes))
d.Set("created_by", disk.CreatedBy)
d.Set("created_time", disk.CreatedTime)
d.Set("deleted_by", disk.DeletedBy)
d.Set("deleted_time", disk.DeletedTime)
d.Set("desc", disk.Description)
d.Set("destruction_time", disk.DestructionTime)
@@ -93,9 +91,7 @@ func flattenDisk(d *schema.ResourceData, disk *disks.RecordDisk) {
d.Set("iotune", flattenIOTune(disk.IOTune))
// d.Set("iqn", disk.IQN)
// d.Set("login", disk.Login)
d.Set("machine_id", disk.MachineID)
d.Set("machine_name", disk.MachineName)
d.Set("milestones", disk.Milestones)
// d.Set("milestones", disk.Milestones)
d.Set("disk_name", disk.Name)
d.Set("order", disk.Order)
d.Set("params", disk.Params)
@@ -114,7 +110,6 @@ func flattenDisk(d *schema.ResourceData, disk *disks.RecordDisk) {
d.Set("role", disk.Role)
d.Set("sep_id", disk.SepID)
d.Set("sep_type", disk.SepType)
d.Set("size_available", disk.SizeAvailable)
d.Set("size_max", disk.SizeMax)
d.Set("size_used", disk.SizeUsed)
d.Set("shareable", disk.Shareable)
@@ -123,8 +118,6 @@ func flattenDisk(d *schema.ResourceData, disk *disks.RecordDisk) {
d.Set("tech_status", disk.TechStatus)
d.Set("type", disk.Type)
d.Set("vmid", disk.VMID)
d.Set("updated_by", disk.UpdatedBy)
d.Set("updated_time", disk.UpdatedTime)
}
func flattenDiskReplication(rep disks.ItemReplication) []map[string]interface{} {
@@ -218,9 +211,7 @@ func flattenDiskList(dl *disks.ListDisks) []map[string]interface{} {
"account_name": disk.AccountName,
"acl": string(diskAcl),
"computes": flattenDiskComputes(disk.Computes),
"created_by": disk.CreatedBy,
"created_time": disk.CreatedTime,
"deleted_by": disk.DeletedBy,
"deleted_time": disk.DeletedTime,
"desc": disk.Description,
"destruction_time": disk.DestructionTime,
@@ -232,7 +223,6 @@ func flattenDiskList(dl *disks.ListDisks) []map[string]interface{} {
"iotune": flattenIOTune(disk.IOTune),
"machine_id": disk.MachineID,
"machine_name": disk.MachineName,
"milestones": disk.Milestones,
"disk_name": disk.Name,
"order": disk.Order,
"params": disk.Params,
@@ -248,7 +238,6 @@ func flattenDiskList(dl *disks.ListDisks) []map[string]interface{} {
"sep_id": disk.SepID,
"sep_type": disk.SepType,
"shareable": disk.Shareable,
"size_available": disk.SizeAvailable,
"size_max": disk.SizeMax,
"size_used": disk.SizeUsed,
"snapshots": flattenDiskSnapshotList(disk.Snapshots),
@@ -256,8 +245,6 @@ func flattenDiskList(dl *disks.ListDisks) []map[string]interface{} {
"tech_status": disk.TechStatus,
"type": disk.Type,
"vmid": disk.VMID,
"updated_by": disk.UpdatedBy,
"updated_time": disk.UpdatedTime,
}
res = append(res, temp)
}

View File

@@ -36,6 +36,7 @@ import (
"context"
"fmt"
"strconv"
"strings"
log "github.com/sirupsen/logrus"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/disks"
@@ -46,6 +47,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func resourceDiskCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
@@ -60,9 +62,23 @@ func resourceDiskCreate(ctx context.Context, d *schema.ResourceData, m interface
return diag.Errorf("resourceDiskCreate: can't create Disk because AccountID %d is not allowed or does not exist", d.Get("account_id").(int))
}
haveGID, err := existGID(ctx, d, m)
if err != nil {
return diag.FromErr(err)
}
if !haveGID {
return diag.Errorf("resourceDiskCreate: can't create Disk because GID %d is not allowed or does not exist", d.Get("gid").(int))
}
req.AccountID = uint64(d.Get("account_id").(int))
req.GID = uint64(d.Get("gid").(int))
req.Name = d.Get("disk_name").(string)
req.Size = uint64(d.Get("size_max").(int))
if typeRaw, ok := d.GetOk("type"); ok {
req.Type = strings.ToUpper(typeRaw.(string))
} else {
req.Type = "D"
}
if sepId, ok := d.GetOk("sep_id"); ok {
req.SEPID = uint64(sepId.(int))
@@ -194,6 +210,14 @@ func resourceDiskUpdate(ctx context.Context, d *schema.ResourceData, m interface
return diag.Errorf("resourceDiskUpdate: can't update Disk because AccountID %d is not allowed or does not exist", d.Get("account_id").(int))
}
haveGID, err := existGID(ctx, d, m)
if err != nil {
return diag.FromErr(err)
}
if !haveGID {
return diag.Errorf("resourceDiskUpdate: can't update Disk because GID %d is not allowed or does not exist", d.Get("gid").(int))
}
disk, err := utilityDiskCheckPresence(ctx, d, m)
if err != nil {
d.SetId("")
@@ -353,14 +377,6 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
//ForceNew: true,
Description: "The unique ID of the subscriber-owner of the disk",
},
"created_by": {
Type: schema.TypeString,
Computed: true,
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,
},
"disk_name": {
Type: schema.TypeString,
Required: true,
@@ -371,6 +387,12 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Required: true,
Description: "Size in GB",
},
"gid": {
Type: schema.TypeInt,
Required: true,
//ForceNew: true,
Description: "ID of the grid (platform)",
},
"pool": {
Type: schema.TypeString,
Optional: true,
@@ -389,6 +411,13 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Description of disk",
},
"type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"D", "B", "T"}, false),
Description: "The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'",
},
"detach": {
Type: schema.TypeBool,
Optional: true,
@@ -495,7 +524,7 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
},
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -556,11 +585,6 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Name of the device",
},
"gid": {
Type: schema.TypeInt,
Computed: true,
Description: "ID of the grid (platform)",
},
// "disk_path": {
// Type: schema.TypeString,
// Computed: true,
@@ -599,14 +623,6 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
// Computed: true,
// Description: "Milestones",
// },
"machine_id": {
Type: schema.TypeInt,
Computed: true,
},
"machine_name": {
Type: schema.TypeString,
Computed: true,
},
"order": {
Type: schema.TypeInt,
Computed: true,
@@ -622,11 +638,6 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "ID of the parent disk",
},
"type": {
Type: schema.TypeString,
Computed: true,
Description: "The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'",
},
// "passwd": {
// Type: schema.TypeString,
// Computed: true,
@@ -768,14 +779,6 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Virtual Machine ID (Deprecated)",
},
"updated_by": {
Type: schema.TypeString,
Computed: true,
},
"updated_time": {
Type: schema.TypeInt,
Computed: true,
},
}
return rets

View File

@@ -454,7 +454,7 @@ func resourceDiskReplicationSchemaMake() map[string]*schema.Schema {
Description: "ID of the pci slot to which the disk is connected",
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,

View File

@@ -270,13 +270,6 @@ func dataSourceExtnetSchemaMake() map[string]*schema.Schema {
},
},
},
"ntp": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
}
return res
}

View File

@@ -107,11 +107,6 @@ func dataSourceExtnetListSchemaMake() map[string]*schema.Schema {
Optional: true,
Description: "Page size",
},
"ovs_bridge": {
Type: schema.TypeString,
Optional: true,
Description: "Name of the openVswitch bridge",
},
"items": {
Type: schema.TypeList,
Computed: true,

View File

@@ -24,7 +24,6 @@ func flattenExtnet(d *schema.ResourceData, e *extnet.RecordExtNet) {
d.Set("net_name", e.Name)
d.Set("network", e.Network)
d.Set("network_id", e.NetworkID)
d.Set("ntp", e.NTP)
d.Set("pre_reservations_num", e.PreReservationsNum)
d.Set("prefix", e.Prefix)
d.Set("pri_vnf_dev_id", e.PriVNFDevID)

View File

@@ -46,11 +46,11 @@ func utilityExtnetListCheckPresence(ctx context.Context, d *schema.ResourceData,
c := m.(*controller.ControllerCfg)
req := extnet.ListRequest{}
if accountID, ok := d.GetOk("account_id"); ok {
req.AccountID = uint64(accountID.(int))
if accountId, ok := d.GetOk("account_id"); ok {
req.AccountID = uint64(accountId.(int))
}
if byID, ok := d.GetOk("by_id"); ok {
req.ByID = uint64(byID.(int))
if by_id, ok := d.GetOk("by_id"); ok {
req.ByID = uint64(by_id.(int))
}
if name, ok := d.GetOk("name"); ok {
req.Name = name.(string)
@@ -58,11 +58,11 @@ func utilityExtnetListCheckPresence(ctx context.Context, d *schema.ResourceData,
if network, ok := d.GetOk("network"); ok {
req.Network = network.(string)
}
if vlanID, ok := d.GetOk("vlan_id"); ok {
req.VLANID = uint64(vlanID.(int))
if vlan_id, ok := d.GetOk("vlan_id"); ok {
req.VLANID = uint64(vlan_id.(int))
}
if vnfDevID, ok := d.GetOk("vnfdev_id"); ok {
req.VNFDevID = uint64(vnfDevID.(int))
if vnfdev_id, ok := d.GetOk("vnfdev_id"); ok {
req.VNFDevID = uint64(vnfdev_id.(int))
}
if status, ok := d.GetOk("status"); ok {
req.Status = status.(string)
@@ -77,10 +77,6 @@ func utilityExtnetListCheckPresence(ctx context.Context, d *schema.ResourceData,
req.Size = uint64(size.(int))
}
if ovsBridge, ok := d.GetOk("ovs_bridge"); ok {
req.OVSBridge = ovsBridge.(string)
}
log.Debugf("utilityExtnetListCheckPresence")
extnetList, err := c.CloudAPI().ExtNet().List(ctx, req)
if err != nil {

View File

@@ -58,7 +58,6 @@ func flattenImage(d *schema.ResourceData, img *image.RecordImage) {
d.Set("sep_id", img.SepID)
d.Set("shared_with", img.SharedWith)
d.Set("size", img.Size)
d.Set("snapshot_id", img.SnapshotID)
d.Set("status", img.Status)
d.Set("tech_status", img.TechStatus)
d.Set("type", img.Type)

View File

@@ -169,7 +169,7 @@ func dataSourceImageExtendSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -198,10 +198,6 @@ func dataSourceImageExtendSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"snapshot_id": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,

View File

@@ -68,8 +68,8 @@ func resourceImageSchemaMake(sch map[string]*schema.Schema) map[string]*schema.S
sch["type"] = &schema.Schema{
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "unknown"}, true),
Description: "Image type linux, windows or unknown",
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "other"}, true),
Description: "Image type linux, windows or other",
}
sch["hot_resize"] = &schema.Schema{

View File

@@ -90,6 +90,9 @@ func resourceImageFromBlankComputeCreate(ctx context.Context, d *schema.Resource
if accountId, ok := d.GetOk("account_id"); ok {
req.AccountID = uint64(accountId.(int))
}
if sepId, ok := d.GetOk("sep_id"); ok {
req.SepID = uint64(sepId.(int))
}
if poolName, ok := d.GetOk("pool_name"); ok {
req.PoolName = poolName.(string)
}
@@ -299,8 +302,8 @@ func resourceImageFromBlankComputeSchemaMake() map[string]*schema.Schema {
"type": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "unknown"}, true),
Description: "Image type linux, windows or unknown",
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "other"}, true),
Description: "Image type linux, windows or other",
},
"username": {
@@ -323,6 +326,7 @@ func resourceImageFromBlankComputeSchemaMake() map[string]*schema.Schema {
},
"sep_id": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
Description: "storage endpoint provider ID",
},
@@ -453,7 +457,7 @@ func resourceImageFromBlankComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -478,10 +482,6 @@ func resourceImageFromBlankComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"snapshot_id": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,

View File

@@ -93,6 +93,9 @@ func resourceImageFromPlatformDiskCreate(ctx context.Context, d *schema.Resource
if accountId, ok := d.GetOk("account_id"); ok {
req.AccountID = uint64(accountId.(int))
}
if sepId, ok := d.GetOk("sep_id"); ok {
req.SepID = uint64(sepId.(int))
}
if poolName, ok := d.GetOk("pool_name"); ok {
req.PoolName = poolName.(string)
}
@@ -289,8 +292,8 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
"type": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "unknown"}, true),
Description: "Image type linux, windows or unknown",
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "other"}, true),
Description: "Image type linux, windows or other",
},
"architecture": {
Type: schema.TypeString,
@@ -319,6 +322,7 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
},
"sep_id": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
Description: "storage endpoint provider ID",
},
@@ -450,7 +454,7 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -475,10 +479,6 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"snapshot_id": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,

View File

@@ -357,10 +357,6 @@ func dataSourceK8sSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"desc": {
Type: schema.TypeString,
Computed: true,
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,

View File

@@ -240,7 +240,6 @@ func flattenK8sData(d *schema.ResourceData, cluster k8s.RecordK8S, masters []com
d.Set("k8sci_id", cluster.CIID)
d.Set("created_by", cluster.CreatedBy)
d.Set("created_time", cluster.CreatedTime)
d.Set("desc", cluster.Description)
d.Set("deleted_by", cluster.DeletedBy)
d.Set("deleted_time", cluster.DeletedTime)
d.Set("k8s_ci_name", cluster.K8CIName)
@@ -354,7 +353,6 @@ func flattenResourceK8sCP(d *schema.ResourceData, k8s k8s.RecordK8S, masters []c
d.Set("bservice_id", k8s.BServiceID)
d.Set("created_by", k8s.CreatedBy)
d.Set("created_time", k8s.CreatedTime)
d.Set("desc", k8s.Description)
d.Set("deleted_by", k8s.DeletedBy)
d.Set("deleted_time", k8s.DeletedTime)
d.Set("k8s_ci_name", k8s.K8CIName)
@@ -395,7 +393,6 @@ func flattenResourceK8s(d *schema.ResourceData, k8s k8s.RecordK8S, masters []com
d.Set("bservice_id", k8s.BServiceID)
d.Set("created_by", k8s.CreatedBy)
d.Set("created_time", k8s.CreatedTime)
d.Set("desc", k8s.Description)
d.Set("deleted_by", k8s.DeletedBy)
d.Set("deleted_time", k8s.DeletedTime)
d.Set("k8s_ci_name", k8s.K8CIName)

View File

@@ -359,7 +359,7 @@ func computeListDisksSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"present_to": {
Type: schema.TypeMap,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -422,10 +422,6 @@ func computeListDisksSchemaMake() map[string]*schema.Schema {
Type: schema.TypeBool,
Computed: true,
},
"size_available": {
Type: schema.TypeFloat,
Computed: true,
},
"size_max": {
Type: schema.TypeInt,
Computed: true,
@@ -970,88 +966,10 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"vgpus": {
Type: schema.TypeList,
Computed: true,
Description: "List of virtual GPUs",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeInt,
Computed: true,
},
"gid": {
Type: schema.TypeInt,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
"mode": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,
},
"profile_id": {
Type: schema.TypeInt,
Computed: true,
},
"ram": {
Type: schema.TypeInt,
Computed: true,
},
"last_update_time": {
Type: schema.TypeInt,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,
},
"vmid": {
Type: schema.TypeInt,
Computed: true,
},
"pgpuid": {
Type: schema.TypeInt,
Computed: true,
},
"reference_id": {
Type: schema.TypeString,
Computed: true,
},
"account_id": {
Type: schema.TypeInt,
Computed: true,
},
"rg_id": {
Type: schema.TypeInt,
Computed: true,
},
"last_claimed_by": {
Type: schema.TypeInt,
Computed: true,
},
"pci_slot": {
Type: schema.TypeInt,
Computed: true,
},
"bus_number": {
Type: schema.TypeInt,
Computed: true,
},
"guid": {
Type: schema.TypeInt,
Computed: true,
},
},
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"virtual_image_id": {
@@ -1070,22 +988,6 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"loader_type": {
Type: schema.TypeString,
Computed: true,
},
"boot_type": {
Type: schema.TypeString,
Computed: true,
},
"hot_resize": {
Type: schema.TypeBool,
Computed: true,
},
"network_interface_naming": {
Type: schema.TypeString,
Computed: true,
},
}
}

View File

@@ -381,22 +381,6 @@ func itemComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"loader_type": {
Type: schema.TypeString,
Computed: true,
},
"boot_type": {
Type: schema.TypeString,
Computed: true,
},
"hot_resize": {
Type: schema.TypeBool,
Computed: true,
},
"network_interface_naming": {
Type: schema.TypeString,
Computed: true,
},
}
}

View File

@@ -47,9 +47,9 @@ func flattenDisks(disks []compute.InfoDisk) []map[string]interface{} {
res := make([]map[string]interface{}, 0)
for _, disk := range disks {
temp := map[string]interface{}{
// "bus_number": disk.BusNumber,
"disk_id": disk.ID,
// "pci_slot": disk.PCISlot,
"bus_number": disk.BusNumber,
"disk_id": disk.ID,
"pci_slot": disk.PCISlot,
}
res = append(res, temp)
}
@@ -217,32 +217,28 @@ func flattenComputeList(computes *compute.ListComputes) []map[string]interface{}
"need_reboot": compute.NeedReboot,
"numa_affinity": compute.NumaAffinity,
"numa_node_id": compute.NumaNodeId,
// "pinned": compute.Pinned,
"preferred_cpu": compute.PreferredCPU,
"ram": compute.RAM,
"reference_id": compute.ReferenceID,
"registered": compute.Registered,
"res_name": compute.ResName,
"reserved_node_cpus": compute.ReservedNodeCpus,
"rg_id": compute.RGID,
"rg_name": compute.RGName,
"snap_sets": flattenSnapSets(compute.SnapSets),
"stateless_sep_id": compute.StatelessSepID,
"stateless_sep_type": compute.StatelessSepType,
"status": compute.Status,
"tags": flattenTags(compute.Tags),
"tech_status": compute.TechStatus,
"total_disk_size": compute.TotalDiskSize,
"updated_by": compute.UpdatedBy,
"updated_time": compute.UpdatedTime,
"user_managed": compute.UserManaged,
"vgpus": compute.VGPUs,
"vins_connected": compute.VINSConnected,
"virtual_image_id": compute.VirtualImageID,
"loader_type": compute.LoaderType,
"boot_type": compute.BootType,
"hot_resize": compute.HotResize,
"network_interface_naming": compute.NetworkInterfaceNaming,
"pinned": compute.Pinned,
"preferred_cpu": compute.PreferredCPU,
"ram": compute.RAM,
"reference_id": compute.ReferenceID,
"registered": compute.Registered,
"res_name": compute.ResName,
"reserved_node_cpus": compute.ReservedNodeCpus,
"rg_id": compute.RGID,
"rg_name": compute.RGName,
"snap_sets": flattenSnapSets(compute.SnapSets),
"stateless_sep_id": compute.StatelessSepID,
"stateless_sep_type": compute.StatelessSepType,
"status": compute.Status,
"tags": flattenTags(compute.Tags),
"tech_status": compute.TechStatus,
"total_disk_size": compute.TotalDiskSize,
"updated_by": compute.UpdatedBy,
"updated_time": compute.UpdatedTime,
"user_managed": compute.UserManaged,
"vgpus": compute.VGPUs,
"vins_connected": compute.VINSConnected,
"virtual_image_id": compute.VirtualImageID,
}
res = append(res, temp)
}
@@ -254,18 +250,17 @@ func flattenBootDisk(bootDisk *compute.ItemComputeDisk) []map[string]interface{}
res := make([]map[string]interface{}, 0)
temp := map[string]interface{}{
"disk_name": bootDisk.Name,
"disk_id": bootDisk.ID,
"disk_type": bootDisk.Type,
"sep_id": bootDisk.SepID,
"shareable": bootDisk.Shareable,
"size_max": bootDisk.SizeMax,
"size_used": bootDisk.SizeUsed,
"pool": bootDisk.Pool,
"desc": bootDisk.Description,
"image_id": bootDisk.ImageID,
"size": bootDisk.SizeMax,
"present_to": bootDisk.PresentTo,
"disk_name": bootDisk.Name,
"disk_id": bootDisk.ID,
"disk_type": bootDisk.Type,
"sep_id": bootDisk.SepID,
"shareable": bootDisk.Shareable,
"size_max": bootDisk.SizeMax,
"size_used": bootDisk.SizeUsed,
"pool": bootDisk.Pool,
"desc": bootDisk.Description,
"image_id": bootDisk.ImageID,
"size": bootDisk.SizeMax,
}
res = append(res, temp)
@@ -306,7 +301,6 @@ func flattenComputeDisksDemo(disksList compute.ListComputeDisks, disksBlocks, ex
"image_id": disk.ImageID,
"size": disk.SizeMax,
"permanently": pernamentlyValue,
"present_to": disk.PresentTo,
}
res = append(res, temp)
indexDataDisks++
@@ -421,7 +415,7 @@ func flattenCompute(d *schema.ResourceData, computeRec compute.RecordCompute, pc
if err := d.Set("os_users", parseOsUsers(computeRec.OSUsers)); err != nil {
return err
}
// d.Set("pinned", computeRec.Pinned)
d.Set("pinned", computeRec.Pinned)
d.Set("preferred_cpu", computeRec.PreferredCPU)
d.Set("ram", computeRec.RAM)
d.Set("reference_id", computeRec.ReferenceID)
@@ -440,13 +434,9 @@ func flattenCompute(d *schema.ResourceData, computeRec compute.RecordCompute, pc
d.Set("updated_time", computeRec.UpdatedTime)
d.Set("user_managed", computeRec.UserManaged)
d.Set("vnc_password", computeRec.VNCPassword)
d.Set("vgpus", flattenVGPUs(computeRec.VGPUs))
d.Set("vgpus", computeRec.VGPUs)
d.Set("virtual_image_id", computeRec.VirtualImageID)
d.Set("virtual_image_name", computeRec.VirtualImageName)
d.Set("loader_type", computeRec.LoaderType)
d.Set("boot_type", computeRec.BootType)
d.Set("hot_resize", computeRec.HotResize)
d.Set("network_interface_naming", computeRec.NetworkInterfaceNaming)
d.Set("enabled", false)
if computeRec.Status == status.Enabled {
@@ -571,7 +561,6 @@ func flattenListComputeDisks(disks compute.ListComputeDisks) []map[string]interf
"role": disk.Role,
"sep_id": disk.SepID,
"shareable": disk.Shareable,
"size_available": disk.SizeAvailable,
"size_max": disk.SizeMax,
"size_used": disk.SizeUsed,
"snapshots": flattenSnapshots(disk.Snapshots),
@@ -671,7 +660,7 @@ func flattenDataCompute(d *schema.ResourceData, computeRec compute.RecordCompute
d.Set("natable_vins_network", computeRec.NatableVINSNetwork)
d.Set("natable_vins_network_name", computeRec.NatableVINSNetworkName)
d.Set("os_users", flattenOsUsers(computeRec.OSUsers))
// d.Set("pinned", computeRec.Pinned)
d.Set("pinned", computeRec.Pinned)
d.Set("preferred_CPU", computeRec.PreferredCPU)
d.Set("ram", computeRec.RAM)
d.Set("reference_id", computeRec.ReferenceID)
@@ -691,14 +680,10 @@ func flattenDataCompute(d *schema.ResourceData, computeRec compute.RecordCompute
d.Set("user_managed", computeRec.UserManaged)
d.Set("userdata", string(userdata))
d.Set("vnc_password", computeRec.VNCPassword)
d.Set("vgpus", flattenVGPUs(computeRec.VGPUs))
d.Set("vgpus", computeRec.VGPUs)
d.Set("virtual_image_id", computeRec.VirtualImageID)
d.Set("virtual_image_name", computeRec.VirtualImageName)
d.Set("pci_devices", flattenPCI(*pciList))
d.Set("loader_type", computeRec.LoaderType)
d.Set("boot_type", computeRec.BootType)
d.Set("hot_resize", computeRec.HotResize)
d.Set("network_interface_naming", computeRec.NetworkInterfaceNaming)
}
func flattenPCI(pciList compute.ListPCIDevices) []uint64 {
@@ -836,34 +821,3 @@ func flattenPCIDevice(deviceList []compute.ItemPCIDevice) []map[string]interface
}
return res
}
func flattenVGPUs(vgpus []compute.VGPUItem) []map[string]interface{} {
res := make([]map[string]interface{}, len(vgpus))
for i, vgpu := range vgpus {
res[i] = map[string]interface{}{
"id": int(vgpu.ID),
"gid": int(vgpu.GID),
"type": vgpu.Type,
"mode": vgpu.Mode,
"status": vgpu.Status,
"profile_id": vgpu.ProfileID,
"ram": int(vgpu.RAM),
"last_update_time": int(vgpu.LastUpdateTime),
"created_time": int(vgpu.CreatedTime),
"deleted_time": int(vgpu.DeletedTime),
"vmid": int(vgpu.VMID),
"pgpuid": int(vgpu.PGPuid),
"reference_id": vgpu.ReferenceID,
"account_id": int(vgpu.AccountID),
"rg_id": int(vgpu.RgID),
"last_claimed_by": int(vgpu.LastClaimedBy),
"pci_slot": int(vgpu.PCISlot),
"bus_number": int(vgpu.BusNumber),
"guid": int(vgpu.GUID),
}
}
return res
}

View File

@@ -147,11 +147,9 @@ func networkSubresourceSchemaMake() map[string]*schema.Schema {
},
"mac": {
Type: schema.TypeString,
Optional: true,
Computed: true,
DiffSuppressFunc: networkSubresIPAddreDiffSupperss,
Description: "MAC address associated with this connection. MAC address is assigned automatically.",
Type: schema.TypeString,
Computed: true,
Description: "MAC address associated with this connection. MAC address is assigned automatically.",
},
"weight": {

View File

@@ -171,11 +171,6 @@ func resourceComputeCreate(ctx context.Context, d *schema.ResourceData, m interf
reqInterface.IPAddr = ipaddr.(string)
}
macaddr, macSet := netInterfaceVal["mac"]
if macSet {
reqInterface.MAC = macaddr.(string)
}
interfaces = append(interfaces, reqInterface)
}
@@ -293,38 +288,6 @@ func resourceComputeCreate(ctx context.Context, d *schema.ResourceData, m interf
log.Debugf("resourceComputeCreate: new simple Compute ID %d, name %s created", computeId, d.Get("name").(string))
updateReq := compute.UpdateRequest{}
loaderType, loaderTypeOk := d.GetOk("loader_type")
bootType, bootTypeOk := d.GetOk("boot_type")
hotResize, hotResizeOk := d.GetOk("hot_resize")
networkInterfaceNaming, networkInterfaceNamingOk := d.GetOk("network_interface_naming")
if loaderTypeOk {
updateReq.LoaderType = loaderType.(string)
}
if bootTypeOk {
updateReq.BootType = bootType.(string)
}
if hotResizeOk {
updateReq.HotResize = hotResize.(bool)
}
if networkInterfaceNamingOk {
updateReq.NetworkInterfaceNaming = networkInterfaceNaming.(string)
}
if loaderTypeOk || bootTypeOk || hotResizeOk || networkInterfaceNamingOk {
log.Debugf("resourceComputeCreate: change loaderType or bootType or hotResize or networkInterfaceNaming on ComputeID: %d", computeId)
updateReq.ComputeID = computeId
_, err := c.CloudAPI().Compute().Update(ctx, updateReq)
if err != nil {
warnings.Add(err)
}
}
if ars, ok := d.GetOk("pci_devices"); ok {
log.Debugf("resourceComputeCreate: add pci devices on ComputeID: %d", computeId)
addedPciDevices := ars.(*schema.Set).List()
@@ -842,62 +805,8 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
}
}
doUpdate := false
resizeReq := compute.ResizeRequest{
ComputeID: computeRec.ID,
}
forceResize, ok := d.GetOk("force_resize")
if ok {
resizeReq.Force = forceResize.(bool)
}
warnings := dc.Warnings{}
oldCpu, newCpu := d.GetChange("cpu")
if oldCpu.(int) > newCpu.(int) && !forceResize.(bool) {
return diag.Errorf("Cannot resize compute ID %d: enable 'force_resize' to reduce compute vCPUs", computeRec.ID)
}
if oldCpu.(int) != newCpu.(int) {
resizeReq.CPU = uint64(newCpu.(int))
doUpdate = true
} else {
resizeReq.CPU = 0
}
if resizeReq.CPU != 0 {
if preferredCPU, ok := d.GetOk("preferred_cpu"); ok {
preferredList := preferredCPU.([]interface{})
if len(preferredList) > 0 {
for _, v := range preferredList {
cpuNum := v.(int)
resizeReq.PreferredCPU = append(resizeReq.PreferredCPU, int64(cpuNum))
}
}
}
oldPCPU, newPCPU := d.GetChange("preferred_cpu")
if len(oldPCPU.([]interface{})) != 0 && len(newPCPU.([]interface{})) == 0 {
resizeReq.PreferredCPU = []int64{-1}
}
}
oldRam, newRam := d.GetChange("ram")
if oldRam.(int) != newRam.(int) {
resizeReq.RAM = uint64(newRam.(int))
doUpdate = true
} else {
resizeReq.RAM = 0
}
if doUpdate {
log.Debugf("resourceComputeUpdate: changing CPU %d -> %d and/or RAM %d -> %d",
oldCpu.(int), newCpu.(int),
oldRam.(int), newRam.(int))
_, err := c.CloudAPI().Compute().Resize(ctx, resizeReq)
if err != nil {
return diag.FromErr(err)
}
}
oldSize, newSize := d.GetChange("boot_disk_size")
if oldSize.(int) < newSize.(int) {
req := compute.DiskResizeRequest{ComputeID: computeRec.ID}
@@ -957,18 +866,77 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
}
}
if d.HasChanges("description",
"name",
"numa_affinity",
"cpu_pin",
"hp_backed",
"chipset",
"auto_start_w_node",
"preferred_cpu",
"loader_type",
"boot_type",
"hot_resize",
"network_interface_naming") {
// Note bene: numa_affinity, cpu_pin, old_cpu > new_cpu and hp_backed are not allowed to be changed for compute in STARTED tech status.
// If STARTED, we need to stop it before update
var isStopRequired bool
if d.HasChanges("numa_affinity", "cpu_pin", "hp_backed", "chipset", "preferred_cpu") && d.Get("started").(bool) {
isStopRequired = true
}
old, new := d.GetChange("cpu")
if old.(int) > new.(int) && d.Get("started").(bool) {
isStopRequired = true
}
if isStopRequired {
if _, err := c.CloudAPI().Compute().Stop(ctx, compute.StopRequest{ComputeID: computeRec.ID}); err != nil {
return diag.FromErr(err)
}
}
doUpdate := false
resizeReq := compute.ResizeRequest{
ComputeID: computeRec.ID,
}
forceResize, ok := d.GetOk("force_resize")
if ok {
resizeReq.Force = forceResize.(bool)
}
oldCpu, newCpu := d.GetChange("cpu")
if oldCpu.(int) > newCpu.(int) && !forceResize.(bool) {
return diag.Errorf("Cannot resize compute ID %d: enable 'force_resize' to reduce compute vCPUs", computeRec.ID)
}
if oldCpu.(int) != newCpu.(int) {
resizeReq.CPU = uint64(newCpu.(int))
doUpdate = true
} else {
resizeReq.CPU = 0
}
if resizeReq.CPU != 0 {
if preferredCPU, ok := d.GetOk("preferred_cpu"); ok {
preferredList := preferredCPU.([]interface{})
if len(preferredList) > 0 {
for _, v := range preferredList {
cpuNum := v.(int)
resizeReq.PreferredCPU = append(resizeReq.PreferredCPU, int64(cpuNum))
}
}
}
oldPCPU, newPCPU := d.GetChange("preferred_cpu")
if len(oldPCPU.([]interface{})) != 0 && len(newPCPU.([]interface{})) == 0 {
resizeReq.PreferredCPU = []int64{-1}
}
}
oldRam, newRam := d.GetChange("ram")
if oldRam.(int) != newRam.(int) {
resizeReq.RAM = uint64(newRam.(int))
doUpdate = true
} else {
resizeReq.RAM = 0
}
if doUpdate {
log.Debugf("resourceComputeUpdate: changing CPU %d -> %d and/or RAM %d -> %d",
oldCpu.(int), newCpu.(int),
oldRam.(int), newRam.(int))
_, err := c.CloudAPI().Compute().Resize(ctx, resizeReq)
if err != nil {
return diag.FromErr(err)
}
}
if d.HasChanges("description", "name", "numa_affinity", "cpu_pin", "hp_backed", "chipset", "auto_start_w_node", "preferred_cpu") {
req := compute.UpdateRequest{
ComputeID: computeRec.ID,
}
@@ -1004,44 +972,17 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
req.HPBacked = d.Get("hp_backed").(bool)
req.AutoStart = d.Get("auto_start_w_node").(bool)
if d.HasChange("loader_type") {
req.LoaderType = d.Get("loader_type").(string)
}
if d.HasChange("boot_type") {
req.BootType = d.Get("boot_type").(string)
}
if d.HasChange("hot_resize") {
req.HotResize = d.Get("hot_resize").(bool)
}
if d.HasChange("network_interface_naming") {
req.NetworkInterfaceNaming = d.Get("network_interface_naming").(string)
}
// Note bene: numa_affinity, cpu_pin and hp_backed are not allowed to be changed for compute in STARTED tech status.
// If STARTED, we need to stop it before update
var isStopRequired bool
if d.HasChanges("numa_affinity", "cpu_pin", "hp_backed", "chipset", "preferred_cpu") && d.Get("started").(bool) {
isStopRequired = true
}
if isStopRequired {
if _, err := c.CloudAPI().Compute().Stop(ctx, compute.StopRequest{ComputeID: computeRec.ID}); err != nil {
return diag.FromErr(err)
}
}
// perform update
if _, err := c.CloudAPI().Compute().Update(ctx, req); err != nil {
return diag.FromErr(err)
}
// If used to be STARTED, we need to start it after update
if isStopRequired {
if _, err := c.CloudAPI().Compute().Start(ctx, compute.StartRequest{ComputeID: computeRec.ID}); err != nil {
return diag.FromErr(err)
}
}
// If used to be STARTED, we need to start it after update
if isStopRequired {
if _, err := c.CloudAPI().Compute().Start(ctx, compute.StartRequest{ComputeID: computeRec.ID}); err != nil {
return diag.FromErr(err)
}
}
@@ -1206,24 +1147,6 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
}
}
if d.HasChange("started") {
if d.Get("started").(bool) {
req := compute.StartRequest{
ComputeID: computeRec.ID,
}
if _, err := c.CloudAPI().Compute().Start(ctx, req); err != nil {
return diag.FromErr(err)
}
} else {
req := compute.StopRequest{
ComputeID: computeRec.ID,
}
if _, err := c.CloudAPI().Compute().Stop(ctx, req); err != nil {
return diag.FromErr(err)
}
}
}
if d.HasChange("affinity_label") {
affinityLabel := d.Get("affinity_label").(string)
if affinityLabel == "" {
@@ -1888,13 +1811,6 @@ func disksSubresourceSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
"present_to": {
Type: schema.TypeMap,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
}
return rets
}
@@ -2012,13 +1928,6 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
),
Description: "Amount of RAM in MB to allocate to this compute instance.",
},
"boot_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"bios", "uefi"}, false),
Description: "Type of image upload.",
},
"image_id": {
Type: schema.TypeInt,
Optional: true,
@@ -2174,6 +2083,7 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeSet,
Optional: true,
MinItems: 1,
MaxItems: constants.MAX_NETWORKS_PER_COMPUTE,
Elem: &schema.Resource{
Schema: networkSubresourceSchemaMake(),
},
@@ -2248,19 +2158,6 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "If true - enable compute, else - disable",
},
"loader_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "unknown"}, false),
Description: "Type of image vm.",
},
"hot_resize": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Description: "Type of image vm.",
},
"pause": {
Type: schema.TypeBool,
Optional: true,
@@ -2320,13 +2217,6 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
Optional: true,
Description: "compute purpose",
},
"network_interface_naming": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"eth", "ens"}, false),
Description: "Name of netfowrk interface.",
},
"numa_affinity": {
Type: schema.TypeString,
Optional: true,
@@ -2578,88 +2468,10 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
Computed: true,
},
"vgpus": {
Type: schema.TypeList,
Computed: true,
Description: "List of virtual GPUs",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeInt,
Computed: true,
},
"gid": {
Type: schema.TypeInt,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
"mode": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,
},
"profile_id": {
Type: schema.TypeInt,
Computed: true,
},
"ram": {
Type: schema.TypeInt,
Computed: true,
},
"last_update_time": {
Type: schema.TypeInt,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
},
"deleted_time": {
Type: schema.TypeInt,
Computed: true,
},
"vmid": {
Type: schema.TypeInt,
Computed: true,
},
"pgpuid": {
Type: schema.TypeInt,
Computed: true,
},
"reference_id": {
Type: schema.TypeString,
Computed: true,
},
"account_id": {
Type: schema.TypeInt,
Computed: true,
},
"rg_id": {
Type: schema.TypeInt,
Computed: true,
},
"last_claimed_by": {
Type: schema.TypeInt,
Computed: true,
},
"pci_slot": {
Type: schema.TypeInt,
Computed: true,
},
"bus_number": {
Type: schema.TypeInt,
Computed: true,
},
"guid": {
Type: schema.TypeInt,
Computed: true,
},
},
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"virtual_image_id": {

Some files were not shown because too many files have changed in this diff Show More