You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/convert/add-new-resource-tgc.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Each of these is discussed in more detail below.
42
42
Magic Modules uses a shared code base to generate terraform-google-conversion and the [google](https://github.com/hashicorp/terraform-provider-google) and [google-beta](https://github.com/hashicorp/terraform-provider-google-beta) Terraform providers.
43
43
Most Terraform resources are represented as [yaml files which are grouped by product](https://github.com/GoogleCloudPlatform/magic-modules/tree/master/mmv1/products).
44
44
Each product has a `product.yaml` file (which defines the basic product information) and Resource.yaml files (which defines any resource-specific information).
45
-
A Resource.yaml file can specify `include_in_tgc_next_DO_NOT_USE: true` to enable converters autogeneration, or `exclude_resource: true` to skip autogeneration for both converters and the providers.
45
+
A Resource.yaml file can specify `include_in_tgc_next: true` to enable converters autogeneration, or `exclude_resource: true` to skip autogeneration for both converters and the providers.
46
46
47
47
Auto-generating converters code based on yaml files is strongly preferred.
48
48
@@ -246,7 +246,7 @@ make test-integration-local TESTPATH=./test/services/alloydb TESTARGS='-run=Tes
246
246
247
247
To run one integration test for the added resource locally, run the following from the root of the `terraform-google-conversion` repository:
248
248
```
249
-
make test-integration-local TESTPATH=./test/services/alloydb TESTARGS='-run=TestAccAlloydbBackup_alloydbBackupBasicTestExample' > alloydbBackup.log
249
+
make test-integration-local TESTPATH=./test/services/alloydb TESTARGS='-run=TestAccAlloydbBackup/TestAccAlloydbBackup_alloydbBackupBasicTestExample' > alloydbBackup.log
250
250
```
251
251
252
252
The core integration tests in `terraform-google-conversion` mirror the naming of the corresponding acceptance tests in the Terraform provider. This testing process uses a crucial round-trip validation method:
@@ -267,7 +267,7 @@ The core integration tests in `terraform-google-conversion` mirror the naming of
Copy file name to clipboardExpand all lines: docs/content/reference/field.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,6 +435,36 @@ item_type:
435
435
MULTI_LINE_FIELD_DESCRIPTION
436
436
```
437
437
438
+
### `min_size`
439
+
Array only. Validates that the array has at least this many items in it.
440
+
441
+
In many cases, it is better to avoid client-side validation. See [Best practices: Validation]({{< ref "/best-practices/validation" >}}) for more information.
442
+
443
+
Example:
444
+
445
+
```yaml
446
+
- name: 'fieldOne'
447
+
type: Array
448
+
item_type:
449
+
type: String
450
+
min_size: 1
451
+
```
452
+
453
+
### `max_size`
454
+
Array only. Validates that the array has at most this many items in it.
455
+
456
+
In many cases, it is better to avoid client-side validation. See [Best practices: Validation]({{< ref "/best-practices/validation" >}}) for more information.
457
+
458
+
Example:
459
+
460
+
```yaml
461
+
- name: 'fieldOne'
462
+
type: Array
463
+
item_type:
464
+
type: String
465
+
max_size: 10
466
+
```
467
+
438
468
### `item_validation`
439
469
Array only. Controls the [`ValidateFunc`](https://developer.hashicorp.com/terraform/plugin/sdkv2/schemas/schema-behaviors#validatefunc)
440
470
used to validate individual items in the array. Behaves like [`validation`]({{<ref "#validation" >}}).
# Skipping the sweeper because we need to force-delete clusters.
67
64
exclude_sweeper: true
68
-
include_in_tgc_next_DO_NOT_USE: true
65
+
include_in_tgc_next: true
69
66
tgc_include_handwritten_tests: true
70
67
examples:
71
68
- name: 'alloydb_cluster_basic'
@@ -326,7 +323,7 @@ properties:
326
323
- name: 'initialUser'
327
324
type: NestedObject
328
325
description: |
329
-
Initial user to setup during cluster creation. This must be set for all new Clusters.
326
+
Initial user to setup during cluster creation. If unset for new Clusters, a postgres role with null password is created. You will need to create additional users or set the password in order to log in.
0 commit comments