pulumiverse-scaleway 1.18.0a1730280133__py3-none-any.whl → 1.19.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumiverse-scaleway might be problematic. Click here for more details.

@@ -1,812 +0,0 @@
1
- # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
- # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
-
5
- import copy
6
- import warnings
7
- import sys
8
- import pulumi
9
- import pulumi.runtime
10
- from typing import Any, Mapping, Optional, Sequence, Union, overload
11
- if sys.version_info >= (3, 11):
12
- from typing import NotRequired, TypedDict, TypeAlias
13
- else:
14
- from typing_extensions import NotRequired, TypedDict, TypeAlias
15
- from . import _utilities
16
-
17
- __all__ = ['DocumentdbInstanceArgs', 'DocumentdbInstance']
18
-
19
- @pulumi.input_type
20
- class DocumentdbInstanceArgs:
21
- def __init__(__self__, *,
22
- engine: pulumi.Input[str],
23
- node_type: pulumi.Input[str],
24
- is_ha_cluster: Optional[pulumi.Input[bool]] = None,
25
- name: Optional[pulumi.Input[str]] = None,
26
- password: Optional[pulumi.Input[str]] = None,
27
- project_id: Optional[pulumi.Input[str]] = None,
28
- region: Optional[pulumi.Input[str]] = None,
29
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
30
- telemetry_enabled: Optional[pulumi.Input[bool]] = None,
31
- user_name: Optional[pulumi.Input[str]] = None,
32
- volume_size_in_gb: Optional[pulumi.Input[int]] = None,
33
- volume_type: Optional[pulumi.Input[str]] = None):
34
- """
35
- The set of arguments for constructing a DocumentdbInstance resource.
36
- :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `FerretDB-1`).
37
-
38
- > **Important:** Updates to `engine` will recreate the Database Instance.
39
- :param pulumi.Input[str] node_type: The type of database instance you want to create (e.g. `docdb-play2-pico`).
40
-
41
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
42
- interruption. Keep in mind that you cannot downgrade a Database Instance.
43
- :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the database instance.
44
- :param pulumi.Input[str] name: The name of the Database Instance.
45
- :param pulumi.Input[str] password: Password for the first user of the database instance.
46
- :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
47
- Instance is associated with.
48
- :param pulumi.Input[str] region: `region`) The region
49
- in which the Database Instance should be created.
50
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
51
- :param pulumi.Input[bool] telemetry_enabled: Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
52
-
53
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
54
- :param pulumi.Input[str] user_name: Identifier for the first user of the database instance.
55
-
56
- > **Important:** Updates to `user_name` will recreate the Database Instance.
57
- :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB) when `volume_type` is set to `bssd`.
58
- :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd` or `lssd`).
59
- """
60
- pulumi.set(__self__, "engine", engine)
61
- pulumi.set(__self__, "node_type", node_type)
62
- if is_ha_cluster is not None:
63
- pulumi.set(__self__, "is_ha_cluster", is_ha_cluster)
64
- if name is not None:
65
- pulumi.set(__self__, "name", name)
66
- if password is not None:
67
- pulumi.set(__self__, "password", password)
68
- if project_id is not None:
69
- pulumi.set(__self__, "project_id", project_id)
70
- if region is not None:
71
- pulumi.set(__self__, "region", region)
72
- if tags is not None:
73
- pulumi.set(__self__, "tags", tags)
74
- if telemetry_enabled is not None:
75
- pulumi.set(__self__, "telemetry_enabled", telemetry_enabled)
76
- if user_name is not None:
77
- pulumi.set(__self__, "user_name", user_name)
78
- if volume_size_in_gb is not None:
79
- pulumi.set(__self__, "volume_size_in_gb", volume_size_in_gb)
80
- if volume_type is not None:
81
- pulumi.set(__self__, "volume_type", volume_type)
82
-
83
- @property
84
- @pulumi.getter
85
- def engine(self) -> pulumi.Input[str]:
86
- """
87
- Database Instance's engine version (e.g. `FerretDB-1`).
88
-
89
- > **Important:** Updates to `engine` will recreate the Database Instance.
90
- """
91
- return pulumi.get(self, "engine")
92
-
93
- @engine.setter
94
- def engine(self, value: pulumi.Input[str]):
95
- pulumi.set(self, "engine", value)
96
-
97
- @property
98
- @pulumi.getter(name="nodeType")
99
- def node_type(self) -> pulumi.Input[str]:
100
- """
101
- The type of database instance you want to create (e.g. `docdb-play2-pico`).
102
-
103
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
104
- interruption. Keep in mind that you cannot downgrade a Database Instance.
105
- """
106
- return pulumi.get(self, "node_type")
107
-
108
- @node_type.setter
109
- def node_type(self, value: pulumi.Input[str]):
110
- pulumi.set(self, "node_type", value)
111
-
112
- @property
113
- @pulumi.getter(name="isHaCluster")
114
- def is_ha_cluster(self) -> Optional[pulumi.Input[bool]]:
115
- """
116
- Enable or disable high availability for the database instance.
117
- """
118
- return pulumi.get(self, "is_ha_cluster")
119
-
120
- @is_ha_cluster.setter
121
- def is_ha_cluster(self, value: Optional[pulumi.Input[bool]]):
122
- pulumi.set(self, "is_ha_cluster", value)
123
-
124
- @property
125
- @pulumi.getter
126
- def name(self) -> Optional[pulumi.Input[str]]:
127
- """
128
- The name of the Database Instance.
129
- """
130
- return pulumi.get(self, "name")
131
-
132
- @name.setter
133
- def name(self, value: Optional[pulumi.Input[str]]):
134
- pulumi.set(self, "name", value)
135
-
136
- @property
137
- @pulumi.getter
138
- def password(self) -> Optional[pulumi.Input[str]]:
139
- """
140
- Password for the first user of the database instance.
141
- """
142
- return pulumi.get(self, "password")
143
-
144
- @password.setter
145
- def password(self, value: Optional[pulumi.Input[str]]):
146
- pulumi.set(self, "password", value)
147
-
148
- @property
149
- @pulumi.getter(name="projectId")
150
- def project_id(self) -> Optional[pulumi.Input[str]]:
151
- """
152
- `project_id`) The ID of the project the Database
153
- Instance is associated with.
154
- """
155
- return pulumi.get(self, "project_id")
156
-
157
- @project_id.setter
158
- def project_id(self, value: Optional[pulumi.Input[str]]):
159
- pulumi.set(self, "project_id", value)
160
-
161
- @property
162
- @pulumi.getter
163
- def region(self) -> Optional[pulumi.Input[str]]:
164
- """
165
- `region`) The region
166
- in which the Database Instance should be created.
167
- """
168
- return pulumi.get(self, "region")
169
-
170
- @region.setter
171
- def region(self, value: Optional[pulumi.Input[str]]):
172
- pulumi.set(self, "region", value)
173
-
174
- @property
175
- @pulumi.getter
176
- def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
177
- """
178
- The tags associated with the Database Instance.
179
- """
180
- return pulumi.get(self, "tags")
181
-
182
- @tags.setter
183
- def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
184
- pulumi.set(self, "tags", value)
185
-
186
- @property
187
- @pulumi.getter(name="telemetryEnabled")
188
- def telemetry_enabled(self) -> Optional[pulumi.Input[bool]]:
189
- """
190
- Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
191
-
192
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
193
- """
194
- return pulumi.get(self, "telemetry_enabled")
195
-
196
- @telemetry_enabled.setter
197
- def telemetry_enabled(self, value: Optional[pulumi.Input[bool]]):
198
- pulumi.set(self, "telemetry_enabled", value)
199
-
200
- @property
201
- @pulumi.getter(name="userName")
202
- def user_name(self) -> Optional[pulumi.Input[str]]:
203
- """
204
- Identifier for the first user of the database instance.
205
-
206
- > **Important:** Updates to `user_name` will recreate the Database Instance.
207
- """
208
- return pulumi.get(self, "user_name")
209
-
210
- @user_name.setter
211
- def user_name(self, value: Optional[pulumi.Input[str]]):
212
- pulumi.set(self, "user_name", value)
213
-
214
- @property
215
- @pulumi.getter(name="volumeSizeInGb")
216
- def volume_size_in_gb(self) -> Optional[pulumi.Input[int]]:
217
- """
218
- Volume size (in GB) when `volume_type` is set to `bssd`.
219
- """
220
- return pulumi.get(self, "volume_size_in_gb")
221
-
222
- @volume_size_in_gb.setter
223
- def volume_size_in_gb(self, value: Optional[pulumi.Input[int]]):
224
- pulumi.set(self, "volume_size_in_gb", value)
225
-
226
- @property
227
- @pulumi.getter(name="volumeType")
228
- def volume_type(self) -> Optional[pulumi.Input[str]]:
229
- """
230
- Type of volume where data are stored (`bssd` or `lssd`).
231
- """
232
- return pulumi.get(self, "volume_type")
233
-
234
- @volume_type.setter
235
- def volume_type(self, value: Optional[pulumi.Input[str]]):
236
- pulumi.set(self, "volume_type", value)
237
-
238
-
239
- @pulumi.input_type
240
- class _DocumentdbInstanceState:
241
- def __init__(__self__, *,
242
- engine: Optional[pulumi.Input[str]] = None,
243
- is_ha_cluster: Optional[pulumi.Input[bool]] = None,
244
- name: Optional[pulumi.Input[str]] = None,
245
- node_type: Optional[pulumi.Input[str]] = None,
246
- password: Optional[pulumi.Input[str]] = None,
247
- project_id: Optional[pulumi.Input[str]] = None,
248
- region: Optional[pulumi.Input[str]] = None,
249
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
250
- telemetry_enabled: Optional[pulumi.Input[bool]] = None,
251
- user_name: Optional[pulumi.Input[str]] = None,
252
- volume_size_in_gb: Optional[pulumi.Input[int]] = None,
253
- volume_type: Optional[pulumi.Input[str]] = None):
254
- """
255
- Input properties used for looking up and filtering DocumentdbInstance resources.
256
- :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `FerretDB-1`).
257
-
258
- > **Important:** Updates to `engine` will recreate the Database Instance.
259
- :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the database instance.
260
- :param pulumi.Input[str] name: The name of the Database Instance.
261
- :param pulumi.Input[str] node_type: The type of database instance you want to create (e.g. `docdb-play2-pico`).
262
-
263
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
264
- interruption. Keep in mind that you cannot downgrade a Database Instance.
265
- :param pulumi.Input[str] password: Password for the first user of the database instance.
266
- :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
267
- Instance is associated with.
268
- :param pulumi.Input[str] region: `region`) The region
269
- in which the Database Instance should be created.
270
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
271
- :param pulumi.Input[bool] telemetry_enabled: Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
272
-
273
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
274
- :param pulumi.Input[str] user_name: Identifier for the first user of the database instance.
275
-
276
- > **Important:** Updates to `user_name` will recreate the Database Instance.
277
- :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB) when `volume_type` is set to `bssd`.
278
- :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd` or `lssd`).
279
- """
280
- if engine is not None:
281
- pulumi.set(__self__, "engine", engine)
282
- if is_ha_cluster is not None:
283
- pulumi.set(__self__, "is_ha_cluster", is_ha_cluster)
284
- if name is not None:
285
- pulumi.set(__self__, "name", name)
286
- if node_type is not None:
287
- pulumi.set(__self__, "node_type", node_type)
288
- if password is not None:
289
- pulumi.set(__self__, "password", password)
290
- if project_id is not None:
291
- pulumi.set(__self__, "project_id", project_id)
292
- if region is not None:
293
- pulumi.set(__self__, "region", region)
294
- if tags is not None:
295
- pulumi.set(__self__, "tags", tags)
296
- if telemetry_enabled is not None:
297
- pulumi.set(__self__, "telemetry_enabled", telemetry_enabled)
298
- if user_name is not None:
299
- pulumi.set(__self__, "user_name", user_name)
300
- if volume_size_in_gb is not None:
301
- pulumi.set(__self__, "volume_size_in_gb", volume_size_in_gb)
302
- if volume_type is not None:
303
- pulumi.set(__self__, "volume_type", volume_type)
304
-
305
- @property
306
- @pulumi.getter
307
- def engine(self) -> Optional[pulumi.Input[str]]:
308
- """
309
- Database Instance's engine version (e.g. `FerretDB-1`).
310
-
311
- > **Important:** Updates to `engine` will recreate the Database Instance.
312
- """
313
- return pulumi.get(self, "engine")
314
-
315
- @engine.setter
316
- def engine(self, value: Optional[pulumi.Input[str]]):
317
- pulumi.set(self, "engine", value)
318
-
319
- @property
320
- @pulumi.getter(name="isHaCluster")
321
- def is_ha_cluster(self) -> Optional[pulumi.Input[bool]]:
322
- """
323
- Enable or disable high availability for the database instance.
324
- """
325
- return pulumi.get(self, "is_ha_cluster")
326
-
327
- @is_ha_cluster.setter
328
- def is_ha_cluster(self, value: Optional[pulumi.Input[bool]]):
329
- pulumi.set(self, "is_ha_cluster", value)
330
-
331
- @property
332
- @pulumi.getter
333
- def name(self) -> Optional[pulumi.Input[str]]:
334
- """
335
- The name of the Database Instance.
336
- """
337
- return pulumi.get(self, "name")
338
-
339
- @name.setter
340
- def name(self, value: Optional[pulumi.Input[str]]):
341
- pulumi.set(self, "name", value)
342
-
343
- @property
344
- @pulumi.getter(name="nodeType")
345
- def node_type(self) -> Optional[pulumi.Input[str]]:
346
- """
347
- The type of database instance you want to create (e.g. `docdb-play2-pico`).
348
-
349
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
350
- interruption. Keep in mind that you cannot downgrade a Database Instance.
351
- """
352
- return pulumi.get(self, "node_type")
353
-
354
- @node_type.setter
355
- def node_type(self, value: Optional[pulumi.Input[str]]):
356
- pulumi.set(self, "node_type", value)
357
-
358
- @property
359
- @pulumi.getter
360
- def password(self) -> Optional[pulumi.Input[str]]:
361
- """
362
- Password for the first user of the database instance.
363
- """
364
- return pulumi.get(self, "password")
365
-
366
- @password.setter
367
- def password(self, value: Optional[pulumi.Input[str]]):
368
- pulumi.set(self, "password", value)
369
-
370
- @property
371
- @pulumi.getter(name="projectId")
372
- def project_id(self) -> Optional[pulumi.Input[str]]:
373
- """
374
- `project_id`) The ID of the project the Database
375
- Instance is associated with.
376
- """
377
- return pulumi.get(self, "project_id")
378
-
379
- @project_id.setter
380
- def project_id(self, value: Optional[pulumi.Input[str]]):
381
- pulumi.set(self, "project_id", value)
382
-
383
- @property
384
- @pulumi.getter
385
- def region(self) -> Optional[pulumi.Input[str]]:
386
- """
387
- `region`) The region
388
- in which the Database Instance should be created.
389
- """
390
- return pulumi.get(self, "region")
391
-
392
- @region.setter
393
- def region(self, value: Optional[pulumi.Input[str]]):
394
- pulumi.set(self, "region", value)
395
-
396
- @property
397
- @pulumi.getter
398
- def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
399
- """
400
- The tags associated with the Database Instance.
401
- """
402
- return pulumi.get(self, "tags")
403
-
404
- @tags.setter
405
- def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
406
- pulumi.set(self, "tags", value)
407
-
408
- @property
409
- @pulumi.getter(name="telemetryEnabled")
410
- def telemetry_enabled(self) -> Optional[pulumi.Input[bool]]:
411
- """
412
- Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
413
-
414
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
415
- """
416
- return pulumi.get(self, "telemetry_enabled")
417
-
418
- @telemetry_enabled.setter
419
- def telemetry_enabled(self, value: Optional[pulumi.Input[bool]]):
420
- pulumi.set(self, "telemetry_enabled", value)
421
-
422
- @property
423
- @pulumi.getter(name="userName")
424
- def user_name(self) -> Optional[pulumi.Input[str]]:
425
- """
426
- Identifier for the first user of the database instance.
427
-
428
- > **Important:** Updates to `user_name` will recreate the Database Instance.
429
- """
430
- return pulumi.get(self, "user_name")
431
-
432
- @user_name.setter
433
- def user_name(self, value: Optional[pulumi.Input[str]]):
434
- pulumi.set(self, "user_name", value)
435
-
436
- @property
437
- @pulumi.getter(name="volumeSizeInGb")
438
- def volume_size_in_gb(self) -> Optional[pulumi.Input[int]]:
439
- """
440
- Volume size (in GB) when `volume_type` is set to `bssd`.
441
- """
442
- return pulumi.get(self, "volume_size_in_gb")
443
-
444
- @volume_size_in_gb.setter
445
- def volume_size_in_gb(self, value: Optional[pulumi.Input[int]]):
446
- pulumi.set(self, "volume_size_in_gb", value)
447
-
448
- @property
449
- @pulumi.getter(name="volumeType")
450
- def volume_type(self) -> Optional[pulumi.Input[str]]:
451
- """
452
- Type of volume where data are stored (`bssd` or `lssd`).
453
- """
454
- return pulumi.get(self, "volume_type")
455
-
456
- @volume_type.setter
457
- def volume_type(self, value: Optional[pulumi.Input[str]]):
458
- pulumi.set(self, "volume_type", value)
459
-
460
-
461
- class DocumentdbInstance(pulumi.CustomResource):
462
- @overload
463
- def __init__(__self__,
464
- resource_name: str,
465
- opts: Optional[pulumi.ResourceOptions] = None,
466
- engine: Optional[pulumi.Input[str]] = None,
467
- is_ha_cluster: Optional[pulumi.Input[bool]] = None,
468
- name: Optional[pulumi.Input[str]] = None,
469
- node_type: Optional[pulumi.Input[str]] = None,
470
- password: Optional[pulumi.Input[str]] = None,
471
- project_id: Optional[pulumi.Input[str]] = None,
472
- region: Optional[pulumi.Input[str]] = None,
473
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
474
- telemetry_enabled: Optional[pulumi.Input[bool]] = None,
475
- user_name: Optional[pulumi.Input[str]] = None,
476
- volume_size_in_gb: Optional[pulumi.Input[int]] = None,
477
- volume_type: Optional[pulumi.Input[str]] = None,
478
- __props__=None):
479
- """
480
- Creates and manages Scaleway Database Instances.
481
-
482
- ## Example Usage
483
-
484
- ### Example Basic
485
-
486
- ```python
487
- import pulumi
488
- import pulumiverse_scaleway as scaleway
489
-
490
- main = scaleway.DocumentdbInstance("main",
491
- name="test-documentdb-instance-basic",
492
- node_type="docdb-play2-pico",
493
- engine="FerretDB-1",
494
- user_name="my_initial_user",
495
- password="thiZ_is_v&ry_s3cret",
496
- tags=[
497
- "terraform-test",
498
- "scaleway_documentdb_instance",
499
- "minimal",
500
- ],
501
- volume_size_in_gb=20)
502
- ```
503
-
504
- ## Import
505
-
506
- Database Instance can be imported using the `{region}/{id}`, e.g.
507
-
508
- bash
509
-
510
- ```sh
511
- $ pulumi import scaleway:index/documentdbInstance:DocumentdbInstance db fr-par/11111111-1111-1111-1111-111111111111
512
- ```
513
-
514
- :param str resource_name: The name of the resource.
515
- :param pulumi.ResourceOptions opts: Options for the resource.
516
- :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `FerretDB-1`).
517
-
518
- > **Important:** Updates to `engine` will recreate the Database Instance.
519
- :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the database instance.
520
- :param pulumi.Input[str] name: The name of the Database Instance.
521
- :param pulumi.Input[str] node_type: The type of database instance you want to create (e.g. `docdb-play2-pico`).
522
-
523
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
524
- interruption. Keep in mind that you cannot downgrade a Database Instance.
525
- :param pulumi.Input[str] password: Password for the first user of the database instance.
526
- :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
527
- Instance is associated with.
528
- :param pulumi.Input[str] region: `region`) The region
529
- in which the Database Instance should be created.
530
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
531
- :param pulumi.Input[bool] telemetry_enabled: Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
532
-
533
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
534
- :param pulumi.Input[str] user_name: Identifier for the first user of the database instance.
535
-
536
- > **Important:** Updates to `user_name` will recreate the Database Instance.
537
- :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB) when `volume_type` is set to `bssd`.
538
- :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd` or `lssd`).
539
- """
540
- ...
541
- @overload
542
- def __init__(__self__,
543
- resource_name: str,
544
- args: DocumentdbInstanceArgs,
545
- opts: Optional[pulumi.ResourceOptions] = None):
546
- """
547
- Creates and manages Scaleway Database Instances.
548
-
549
- ## Example Usage
550
-
551
- ### Example Basic
552
-
553
- ```python
554
- import pulumi
555
- import pulumiverse_scaleway as scaleway
556
-
557
- main = scaleway.DocumentdbInstance("main",
558
- name="test-documentdb-instance-basic",
559
- node_type="docdb-play2-pico",
560
- engine="FerretDB-1",
561
- user_name="my_initial_user",
562
- password="thiZ_is_v&ry_s3cret",
563
- tags=[
564
- "terraform-test",
565
- "scaleway_documentdb_instance",
566
- "minimal",
567
- ],
568
- volume_size_in_gb=20)
569
- ```
570
-
571
- ## Import
572
-
573
- Database Instance can be imported using the `{region}/{id}`, e.g.
574
-
575
- bash
576
-
577
- ```sh
578
- $ pulumi import scaleway:index/documentdbInstance:DocumentdbInstance db fr-par/11111111-1111-1111-1111-111111111111
579
- ```
580
-
581
- :param str resource_name: The name of the resource.
582
- :param DocumentdbInstanceArgs args: The arguments to use to populate this resource's properties.
583
- :param pulumi.ResourceOptions opts: Options for the resource.
584
- """
585
- ...
586
- def __init__(__self__, resource_name: str, *args, **kwargs):
587
- resource_args, opts = _utilities.get_resource_args_opts(DocumentdbInstanceArgs, pulumi.ResourceOptions, *args, **kwargs)
588
- if resource_args is not None:
589
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
590
- else:
591
- __self__._internal_init(resource_name, *args, **kwargs)
592
-
593
- def _internal_init(__self__,
594
- resource_name: str,
595
- opts: Optional[pulumi.ResourceOptions] = None,
596
- engine: Optional[pulumi.Input[str]] = None,
597
- is_ha_cluster: Optional[pulumi.Input[bool]] = None,
598
- name: Optional[pulumi.Input[str]] = None,
599
- node_type: Optional[pulumi.Input[str]] = None,
600
- password: Optional[pulumi.Input[str]] = None,
601
- project_id: Optional[pulumi.Input[str]] = None,
602
- region: Optional[pulumi.Input[str]] = None,
603
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
604
- telemetry_enabled: Optional[pulumi.Input[bool]] = None,
605
- user_name: Optional[pulumi.Input[str]] = None,
606
- volume_size_in_gb: Optional[pulumi.Input[int]] = None,
607
- volume_type: Optional[pulumi.Input[str]] = None,
608
- __props__=None):
609
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
610
- if not isinstance(opts, pulumi.ResourceOptions):
611
- raise TypeError('Expected resource options to be a ResourceOptions instance')
612
- if opts.id is None:
613
- if __props__ is not None:
614
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
615
- __props__ = DocumentdbInstanceArgs.__new__(DocumentdbInstanceArgs)
616
-
617
- if engine is None and not opts.urn:
618
- raise TypeError("Missing required property 'engine'")
619
- __props__.__dict__["engine"] = engine
620
- __props__.__dict__["is_ha_cluster"] = is_ha_cluster
621
- __props__.__dict__["name"] = name
622
- if node_type is None and not opts.urn:
623
- raise TypeError("Missing required property 'node_type'")
624
- __props__.__dict__["node_type"] = node_type
625
- __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
626
- __props__.__dict__["project_id"] = project_id
627
- __props__.__dict__["region"] = region
628
- __props__.__dict__["tags"] = tags
629
- __props__.__dict__["telemetry_enabled"] = telemetry_enabled
630
- __props__.__dict__["user_name"] = user_name
631
- __props__.__dict__["volume_size_in_gb"] = volume_size_in_gb
632
- __props__.__dict__["volume_type"] = volume_type
633
- secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["password"])
634
- opts = pulumi.ResourceOptions.merge(opts, secret_opts)
635
- super(DocumentdbInstance, __self__).__init__(
636
- 'scaleway:index/documentdbInstance:DocumentdbInstance',
637
- resource_name,
638
- __props__,
639
- opts)
640
-
641
- @staticmethod
642
- def get(resource_name: str,
643
- id: pulumi.Input[str],
644
- opts: Optional[pulumi.ResourceOptions] = None,
645
- engine: Optional[pulumi.Input[str]] = None,
646
- is_ha_cluster: Optional[pulumi.Input[bool]] = None,
647
- name: Optional[pulumi.Input[str]] = None,
648
- node_type: Optional[pulumi.Input[str]] = None,
649
- password: Optional[pulumi.Input[str]] = None,
650
- project_id: Optional[pulumi.Input[str]] = None,
651
- region: Optional[pulumi.Input[str]] = None,
652
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
653
- telemetry_enabled: Optional[pulumi.Input[bool]] = None,
654
- user_name: Optional[pulumi.Input[str]] = None,
655
- volume_size_in_gb: Optional[pulumi.Input[int]] = None,
656
- volume_type: Optional[pulumi.Input[str]] = None) -> 'DocumentdbInstance':
657
- """
658
- Get an existing DocumentdbInstance resource's state with the given name, id, and optional extra
659
- properties used to qualify the lookup.
660
-
661
- :param str resource_name: The unique name of the resulting resource.
662
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
663
- :param pulumi.ResourceOptions opts: Options for the resource.
664
- :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `FerretDB-1`).
665
-
666
- > **Important:** Updates to `engine` will recreate the Database Instance.
667
- :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the database instance.
668
- :param pulumi.Input[str] name: The name of the Database Instance.
669
- :param pulumi.Input[str] node_type: The type of database instance you want to create (e.g. `docdb-play2-pico`).
670
-
671
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
672
- interruption. Keep in mind that you cannot downgrade a Database Instance.
673
- :param pulumi.Input[str] password: Password for the first user of the database instance.
674
- :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
675
- Instance is associated with.
676
- :param pulumi.Input[str] region: `region`) The region
677
- in which the Database Instance should be created.
678
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
679
- :param pulumi.Input[bool] telemetry_enabled: Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
680
-
681
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
682
- :param pulumi.Input[str] user_name: Identifier for the first user of the database instance.
683
-
684
- > **Important:** Updates to `user_name` will recreate the Database Instance.
685
- :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB) when `volume_type` is set to `bssd`.
686
- :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd` or `lssd`).
687
- """
688
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
689
-
690
- __props__ = _DocumentdbInstanceState.__new__(_DocumentdbInstanceState)
691
-
692
- __props__.__dict__["engine"] = engine
693
- __props__.__dict__["is_ha_cluster"] = is_ha_cluster
694
- __props__.__dict__["name"] = name
695
- __props__.__dict__["node_type"] = node_type
696
- __props__.__dict__["password"] = password
697
- __props__.__dict__["project_id"] = project_id
698
- __props__.__dict__["region"] = region
699
- __props__.__dict__["tags"] = tags
700
- __props__.__dict__["telemetry_enabled"] = telemetry_enabled
701
- __props__.__dict__["user_name"] = user_name
702
- __props__.__dict__["volume_size_in_gb"] = volume_size_in_gb
703
- __props__.__dict__["volume_type"] = volume_type
704
- return DocumentdbInstance(resource_name, opts=opts, __props__=__props__)
705
-
706
- @property
707
- @pulumi.getter
708
- def engine(self) -> pulumi.Output[str]:
709
- """
710
- Database Instance's engine version (e.g. `FerretDB-1`).
711
-
712
- > **Important:** Updates to `engine` will recreate the Database Instance.
713
- """
714
- return pulumi.get(self, "engine")
715
-
716
- @property
717
- @pulumi.getter(name="isHaCluster")
718
- def is_ha_cluster(self) -> pulumi.Output[Optional[bool]]:
719
- """
720
- Enable or disable high availability for the database instance.
721
- """
722
- return pulumi.get(self, "is_ha_cluster")
723
-
724
- @property
725
- @pulumi.getter
726
- def name(self) -> pulumi.Output[str]:
727
- """
728
- The name of the Database Instance.
729
- """
730
- return pulumi.get(self, "name")
731
-
732
- @property
733
- @pulumi.getter(name="nodeType")
734
- def node_type(self) -> pulumi.Output[str]:
735
- """
736
- The type of database instance you want to create (e.g. `docdb-play2-pico`).
737
-
738
- > **Important:** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
739
- interruption. Keep in mind that you cannot downgrade a Database Instance.
740
- """
741
- return pulumi.get(self, "node_type")
742
-
743
- @property
744
- @pulumi.getter
745
- def password(self) -> pulumi.Output[Optional[str]]:
746
- """
747
- Password for the first user of the database instance.
748
- """
749
- return pulumi.get(self, "password")
750
-
751
- @property
752
- @pulumi.getter(name="projectId")
753
- def project_id(self) -> pulumi.Output[str]:
754
- """
755
- `project_id`) The ID of the project the Database
756
- Instance is associated with.
757
- """
758
- return pulumi.get(self, "project_id")
759
-
760
- @property
761
- @pulumi.getter
762
- def region(self) -> pulumi.Output[str]:
763
- """
764
- `region`) The region
765
- in which the Database Instance should be created.
766
- """
767
- return pulumi.get(self, "region")
768
-
769
- @property
770
- @pulumi.getter
771
- def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
772
- """
773
- The tags associated with the Database Instance.
774
- """
775
- return pulumi.get(self, "tags")
776
-
777
- @property
778
- @pulumi.getter(name="telemetryEnabled")
779
- def telemetry_enabled(self) -> pulumi.Output[Optional[bool]]:
780
- """
781
- Enable telemetry to collects basic anonymous usage data and sends them to FerretDB telemetry service. More about the telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).
782
-
783
- > **Important:** Updates to `is_ha_cluster` will recreate the Database Instance.
784
- """
785
- return pulumi.get(self, "telemetry_enabled")
786
-
787
- @property
788
- @pulumi.getter(name="userName")
789
- def user_name(self) -> pulumi.Output[Optional[str]]:
790
- """
791
- Identifier for the first user of the database instance.
792
-
793
- > **Important:** Updates to `user_name` will recreate the Database Instance.
794
- """
795
- return pulumi.get(self, "user_name")
796
-
797
- @property
798
- @pulumi.getter(name="volumeSizeInGb")
799
- def volume_size_in_gb(self) -> pulumi.Output[int]:
800
- """
801
- Volume size (in GB) when `volume_type` is set to `bssd`.
802
- """
803
- return pulumi.get(self, "volume_size_in_gb")
804
-
805
- @property
806
- @pulumi.getter(name="volumeType")
807
- def volume_type(self) -> pulumi.Output[Optional[str]]:
808
- """
809
- Type of volume where data are stored (`bssd` or `lssd`).
810
- """
811
- return pulumi.get(self, "volume_type")
812
-