Resource nubes_mongodb · Service ID: 92 · Service Name: MongoDB¶
Manual · Create params · Modify params · Output params · Operations · Example
Create params¶
Обязательные параметры (вводимые пользователем)
| ID | Code | Type | Description | Constraints |
|---|---|---|---|---|
| 1089 | startup_configuration | map-fixed | ||
| 1090 | cluster_configuration | map-fixed | ||
| 1091 | access_configuration | map-fixed | ||
| 1102 | backup_configuration | map-fixed | ||
| 1116 | mongo_configuration | map-fixed |
startupConfiguration (map-fixed)¶
| ID | Code | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|---|
| 594 | resource_realm | string | **yes** | Кластер Kubernetes, на котором будет развернут экземпляр | value_list=iot-naeel, k8s-3-sandbox-nubes-ru, k8s-4-sandbox-nubes-ru, naeel-test-3 |
clusterConfiguration (map-fixed)¶
| ID | Code | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|---|
| 595 | cpu | integer | **yes** | 1000 | ||
| 596 | memory | integer | **yes** | 1024 | ||
| 597 | replicas | integer | **yes** | 1 | value_list=1, 3, 5, 7 | |
| 598 | disk | integer | **yes** | 5 | Указывается в Gb |
accessConfiguration (map-fixed)¶
| ID | Code | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|---|
| 599 | master_ip_space | string | **yes** | Из какого Ip-Space резервировать внешний IP Список предоставляется из Организации, в котором развёрнута ресурсная платформа | ||
| 600 | master_access_list | json | **yes** | [] | Необходимо настраивать, когда зарезервирован внешний адрес Если передан пустой массив, доступ выделяется всем |
backupConfiguration (map-fixed)¶
| ID | Code | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|---|
| 637 | schedule | string | **yes** | 0 0 * * * | ``` * * * * * ``` <-- Минута(0-59), Час(0-23), День(1-31), Месяц(1-12), День_недели(0-7, где 0-Вс) | regex=^((((\d+,)+\d+|(\d+(\/|-|#)\d+)|(\d+L?)|(\*(\/\d+)?)|(L(-\d+)?)|(\?)|([A-Z]{3}(-[A-Z]{3})?)) ?){5,7})|(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)$ |
| 635 | s3_uid | uuid | **yes** | |||
| 636 | retain | integer | **yes** | 7 |
mongoConfiguration (map-fixed)¶
| ID | Code | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|---|
| 679 | tls | boolean | **yes** | Шифрует данные между внешними подключениями и базой данных. | value_list=true, false |
Параметры поведения (кратко)
По умолчанию: `suspend_on_destroy = True`, `adopt_existing_on_create = False`.
При `terraform destroy` или удалении ресурса из манифеста:
- `suspend_on_destroy=true` — инстанс переводится в `Suspend` (не удаляется).
- `suspend_on_destroy=false` — Terraform удаляет ресурс только из state.
При `apply` флаг `adopt_existing_on_create` работает как авто-`import`:
- `false` — если ресурс уже есть, будет ошибка.
- `true` — Terraform может взять существующий инстанс под управление (`running` → adopt, `suspended` → resume+adopt при совпадении параметров).
Важно: один инстанс должен быть только в одном state. Иначе получите конфликт управления.
По умолчанию: `suspend_on_destroy = True`, `adopt_existing_on_create = False`.
При `terraform destroy` или удалении ресурса из манифеста:
- `suspend_on_destroy=true` — инстанс переводится в `Suspend` (не удаляется).
- `suspend_on_destroy=false` — Terraform удаляет ресурс только из state.
При `apply` флаг `adopt_existing_on_create` работает как авто-`import`:
- `false` — если ресурс уже есть, будет ошибка.
- `true` — Terraform может взять существующий инстанс под управление (`running` → adopt, `suspended` → resume+adopt при совпадении параметров).
Важно: один инстанс должен быть только в одном state. Иначе получите конфликт управления.