Skip to content

Commit af7ceb5

Browse files
Add descriptions to schemas by hand to MM resources (#4418) (#2939)
Co-authored-by: upodroid <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: upodroid <[email protected]>
1 parent 7f07f25 commit af7ceb5

12 files changed

+37
-16
lines changed

.changelog/4418.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```release-note:deprecation
2+
pubsub: deprecated `path` field in `google_pubsub_subscription` resource as it is identical value to `id` field.
3+
```
4+
```release-note:deprecation
5+
kms: deprecated `self_link` field in `google_kms_keyring` and `google_kms_cryptokey` resource as it is identical value to `id` field.
6+
```
7+
```release-note:deprecation
8+
compute: deprecated `source_disk_url` field in `google_compute_snapshot`.
9+
```

google-beta/resource_api_gateway_api_config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ If not specified, backend authentication will be set to use OIDC authentication
145145
Computed: true,
146146
ForceNew: true,
147147
ConflictsWith: []string{"api_config_id"},
148+
Description: `Creates a unique name beginning with the specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.`,
148149
},
149150
"project": {
150151
Type: schema.TypeString,

google-beta/resource_compute_region_ssl_certificate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ If it is not provided, the provider region is used.`,
106106
Computed: true,
107107
ForceNew: true,
108108
ConflictsWith: []string{"name"},
109+
Description: "Creates a unique name beginning with the specified prefix. Conflicts with name.",
109110
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
110111
// https://cloud.google.com/compute/docs/reference/latest/sslCertificates#resource
111112
// uuid is 26 characters, limit the prefix to 37.

google-beta/resource_compute_route.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ Default value is 1000. Valid range is 0 through 65535.`,
158158
Description: `URL to a Network that should handle matching packets.`,
159159
},
160160
"next_hop_instance_zone": {
161-
Type: schema.TypeString,
162-
Optional: true,
163-
ForceNew: true,
161+
Type: schema.TypeString,
162+
Optional: true,
163+
ForceNew: true,
164+
Description: "The zone of the instance specified in next_hop_instance. Omit if next_hop_instance is specified as a URL.",
164165
},
165166
"project": {
166167
Type: schema.TypeString,

google-beta/resource_compute_snapshot.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ storage, this number is expected to change with snapshot
200200
creation/deletion.`,
201201
},
202202
"source_disk_link": {
203-
Type: schema.TypeString,
204-
Computed: true,
203+
Type: schema.TypeString,
204+
Computed: true,
205+
Deprecated: "Deprecated in favor of source_disk, which contains a compatible value. This field will be removed in the next major release of the provider.",
205206
},
206207
"project": {
207208
Type: schema.TypeString,

google-beta/resource_compute_ssl_certificate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ These are in the same namespace as the managed SSL certificates.`,
9797
Computed: true,
9898
ForceNew: true,
9999
ConflictsWith: []string{"name"},
100+
Description: "Creates a unique name beginning with the specified prefix. Conflicts with name.",
100101
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
101102
// https://cloud.google.com/compute/docs/reference/latest/sslCertificates#resource
102103
// uuid is 26 characters, limit the prefix to 37.

google-beta/resource_kms_crypto_key.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ See the [algorithm reference](https://cloud.google.com/kms/docs/reference/rest/v
127127
},
128128
},
129129
"self_link": {
130-
Type: schema.TypeString,
131-
Computed: true,
130+
Type: schema.TypeString,
131+
Computed: true,
132+
Deprecated: "Deprecated in favor of id, which contains an identical value. This field will be removed in the next major release of the provider.",
133+
Description: "The self link of the created KeyRing in the format projects/{project}/locations/{location}/keyRings/{name}.",
132134
},
133135
},
134136
UseJSONNumber: true,

google-beta/resource_kms_key_ring.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ A full list of valid locations can be found by running 'gcloud kms locations lis
5353
Description: `The resource name for the KeyRing.`,
5454
},
5555
"self_link": {
56-
Type: schema.TypeString,
57-
Computed: true,
56+
Type: schema.TypeString,
57+
Computed: true,
58+
Deprecated: "Deprecated in favor of id, which contains an identical value. This field will be removed in the next major release of the provider.",
59+
Description: "The self link of the created KeyRing in the format projects/{project}/locations/{location}/keyRings/{name}.",
5860
},
5961
"project": {
6062
Type: schema.TypeString,

google-beta/resource_pubsub_subscription.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,10 @@ A duration in seconds with up to nine fractional digits, terminated by 's'. Exam
318318
},
319319
},
320320
"path": {
321-
Type: schema.TypeString,
322-
Computed: true,
321+
Type: schema.TypeString,
322+
Computed: true,
323+
Deprecated: "Deprecated in favor of id, which contains an identical value. This field will be removed in the next major release of the provider.",
324+
Description: " Path of the subscription in the format projects/{project}/subscriptions/{name}",
323325
},
324326
"project": {
325327
Type: schema.TypeString,

google-beta/resource_redis_instance.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ checked before each import/export operation.`,
198198
Description: `The port number of the exposed Redis endpoint.`,
199199
},
200200
"auth_string": {
201-
Type: schema.TypeString,
202-
Optional: true,
203-
Computed: true,
201+
Type: schema.TypeString,
202+
Description: "AUTH String set on the instance. This field will only be populated if auth_enabled is true.",
203+
Optional: true,
204+
Computed: true,
204205
},
205206
"project": {
206207
Type: schema.TypeString,

0 commit comments

Comments
 (0)