# Примеры применения ресурсов terraform-provider-decort

Каждый файл снабжен комментариями, которые кратко описывают возможности и параметры ресурса.  
Для успешной работы необходим установленный terraform.

## Ресурсы в примерах

- cloudapi:
  - data:
    - account
    - account_audits_list
    - account_computes_list
    - account_consumed_units
    - account_consumed_units_by_type
    - account_deleted_list
    - account_disks_list
    - account_flipgroups_list
    - account_list
    - account_reserved_units
    - account_resource_consumption_get
    - account_resource_consumption_list
    - account_rg_list
    - account_templates_list
    - account_vins_list
    - audit
    - bservice
    - bservice_deleted_list
    - bservice_group
    - bservice_list
    - bservice_snapshot_list
    - disk
    - disk_list
    - disk_list_deleted
    - disk_list_types
    - disk_list_types_detailed
    - disk_list_unattached
    - disk_replication
    - disk_snapshot
    - disk_snapshot_list
    - dpdknet
    - dpdknet_list
    - extnet
    - extnet_computes_list
    - extnet_default
    - extnet_list
    - extnet_reserved_ip_list
    - flipgroup
    - flipgroup_list
    - image
    - image_list
    - k8ci_list
    - k8s
    - k8s_computes
    - k8s_list
    - k8s_list_deleted
    - k8s_wg
    - k8s_wg_cloud_init
    - k8s_wg_list
    - kvmvm
    - kvmvm_audits
    - kvmvm_get_audits
    - kvmvm_get_console_url
    - kvmvm_get_log
    - kvmvm_list
    - vkvmvm_list_deleted
    - kvmvm_pci_device_list
    - kvmvm_pfw_list
    - kvmvm_snapshot_usage
    - kvmvm_user_list
    - kvmvm_vgpu_list
    - lb
    - lb_list
    - lb_list_deleted
    - location_url
    - locations_list
    - resgroup
    - rg_affinity_group_computes
    - rg_affinity_groups_get
    - rg_affinity_groups_list
    - rg_audits
    - rg_list
    - rg_list_computes
    - rg_list_deleted
    - rg_list_lb
    - rg_list_pfw
    - rg_list_vins
    - rg_resource_consumption_get
    - rg_resource_consumption_list
    - rg_usage
    - snapshot_list
    - stack
    - stack_list
    - vfpool
    - vfpool_list
    - vins
    - vins_audits
    - vins_ext_net_list
    - vins_ip_list
    - vins_list
    - vins_list_deleted
    - vins_nat_rule_list
    - vins_static_route
    - vins_static_route_list
  - resources:
    - account
    - bservice
    - bservice_group
    - disk
    - disk_snapshot
    - flipgroup
    - image
    - image_from_blank_compute
    - image_from_platform_disk
    - image_virtual
    - k8s
    - k8s_cp
    - k8s_wg
    - kvmvm
    - lb
    - lb_backend
    - lb_backend_server
    - lb_frontend
    - lb_frontend_bind
    - pfw
    - resgroup
    - snapshot
    - vins
    - vins_static_route
- cloudbroker:
  - data:
    - cb_account
    - cb_account_audits_list
    - cb_account_available_templates_list
    - cb_account_computes_list
    - cb_account_disks_list
    - cb_account_flipgroups_list
    - cb_account_list
    - cb_account_list_deleted
    - cb_account_resource_consumption_get
    - cb_account_resource_consumption_list
    - cb_account_rg_list
    - cb_account_vins_list
    - cb_audit
    - cb_audit_linked_jobs
    - cb_audit_list
    - cb_audits_export_to_file
    - cb_disk
    - cb_disk_list
    - cb_disk_list_deleted
    - cb_disk_list_types
    - cb_disk_list_types_detailed
    - cb_disk_list_unattached
    - cb_disk_replication
    - cb_disk_snapshot
    - cb_disk_snapshot_list
    - cb_dpdknet
    - cb_dpdknet_list
    - cb_extnet
    - cb_extnet_default
    - cb_extnet_list
    - cb_extnet_reserved_ip_list
    - cb_extnet_static_route
    - cb_extnet_static_route_list
    - cb_flipgroup
    - cb_flipgroup_list
    - cb_grid
    - cb_grid_get_consumption
    - cb_grid_get_diagnosis
    - cb_grid_get_settings
    - cb_grid_get_status
    - cb_grid_list
    - cb_grid_list_consumption
    - cb_grid_list_emails
    - cb_grid_post_status
    - cb_image
    - cb_image_list
    - cb_image_list_stacks
    - cb_k8ci
    - cb_k8ci_list
    - cb_k8ci_list_deleted
    - cb_k8s
    - cb_k8s_computes
    - cb_k8s_list
    - cb_k8s_list_deleted
    - cb_k8s_wg
    - cb_k8s_wg_cloud_init
    - cb_k8s_wg_list
    - cb_kvmvm
    - cb_kvmvm_affinity_relations
    - cb_kvmvm_audits
    - cb_kvmvm_boot_order_get
    - cb_kvmvm_get_audits
    - cb_kvmvm_get_console_url
    - cb_kvmvm_get_log
    - cb_kvmvm_list
    - cb_kvmvm_list_deleted
    - cb_kvmvm_migrate_storage_info
    - cb_kvmvm_pci_device_list
    - cb_kvmvm_pfw_list
    - cb_kvmvm_snapshot_list
    - cb_kvmvm_snapshot_usage
    - cb_kvmvm_user_list
    - cb_kvmvm_vgpu_list
    - cb_lb
    - cb_lb_list
    - cb_lb_list_deleted
    - cb_node
    - cb_node_list
    - cb_pcidevice
    - cb_pcidevice_list
    - cb_rg
    - cb_rg_affinity_group_computes
    - cb_rg_affinity_groups_get
    - cb_rg_affinity_groups_list
    - cb_rg_audits
    - cb_rg_list
    - cb_rg_list_computes
    - cb_rg_list_deleted
    - cb_rg_list_lb
    - cb_rg_list_pfw
    - cb_rg_list_vins
    - cb_rg_resource_consumption_get
    - cb_rg_resource_consumption_list
    - cb_rg_usage
    - cb_sep
    - cb_sep_config
    - cb_sep_consumption
    - cb_sep_disk_list
    - cb_sep_list
    - cb_sep_pool
    - cb_stack
    - cb_stack_list
    - cb_user
    - cb_user_get_audit
    - cb_user_list
    - cb_vfpool
    - cb_vfpool_list
    - cb_vins
    - cb_vins_audits
    - cb_vins_ext_net_list
    - cb_vins_ip_list
    - cb_vins_list
    - cb_vins_list_deleted
    - cb_vins_nat_rule_list
    - cb_vins_static_route
    - cb_vins_static_route_list
  - resources:
    - cb_account
    - cb_cdrom_image
    - cb_disk
    - cb_disk_snapshot
    - cb_dpdknet
    - cb_extnet
    - cb_extnet_static_route
    - cb_flipgroup
    - cb_image
    - cb_image_from_blank_compute
    - cb_image_from_platform_disk
    - cb_k8ci
    - cb_k8s_cp
    - cb_k8s_wg
    - cb_kvmvm
    - cb_lb
    - cb_lb_backend
    - cb_lb_backend_server
    - cb_lb_frontend
    - cb_lb_frontend_bind
    - cb_pcidevice
    - cb_rg
    - cb_sep
    - cb_sep_config
    - cb_user
    - cb_vfpool
    - cb_vins
    - cb_vins_static_route
    - cb_virtual_image

## Как пользоваться примерами

1. Установить terraform
2. Установить terraform-provider-decort с помощью команды `terraform init` (выполняется автоматически), либо вручную.
3. Заменить параметр _controller_url_ на ваш.
4. Заменить параметр _oauth2_url_ на ваш.
5. Добавить ключи
   _DECORT_APP_SECRET_ и _DECORT_APP_ID_
   в качестве переменных окружения, либо
   можно добавить `app_id` и `app_secret`
   в блок `provider`,что небезопасно, т.к. данные
   могут быть похищены при передачи файла.
