Skip to content

Commit 4afeb66

Browse files
Promote some remaining vmwareengine fields (#15259) (#10828)
[upstream:7002fc9020fb9d1f75f119ac63a87c392cdd1846] Signed-off-by: Modular Magician <[email protected]>
1 parent ec3d3d6 commit 4afeb66

9 files changed

+178
-0
lines changed

google-beta/services/vmwareengine/resource_vmwareengine_cluster.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@ Once the customer is created then corecount cannot be changed.`,
218218
},
219219
},
220220
},
221+
"create_time": {
222+
Type: schema.TypeString,
223+
Computed: true,
224+
Description: `Creation time of this resource.
225+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
226+
up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
227+
},
221228
"management": {
222229
Type: schema.TypeBool,
223230
Computed: true,
@@ -234,6 +241,13 @@ There can only be one management cluster in a private cloud and it has to be the
234241
Computed: true,
235242
Description: `System-generated unique identifier for the resource.`,
236243
},
244+
"update_time": {
245+
Type: schema.TypeString,
246+
Computed: true,
247+
Description: `Last updated time of this resource.
248+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
249+
fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
250+
},
237251
},
238252
UseJSONNumber: true,
239253
}
@@ -345,6 +359,12 @@ func resourceVmwareengineClusterRead(d *schema.ResourceData, meta interface{}) e
345359
return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("VmwareengineCluster %q", d.Id()))
346360
}
347361

362+
if err := d.Set("create_time", flattenVmwareengineClusterCreateTime(res["createTime"], d, config)); err != nil {
363+
return fmt.Errorf("Error reading Cluster: %s", err)
364+
}
365+
if err := d.Set("update_time", flattenVmwareengineClusterUpdateTime(res["updateTime"], d, config)); err != nil {
366+
return fmt.Errorf("Error reading Cluster: %s", err)
367+
}
348368
if err := d.Set("management", flattenVmwareengineClusterManagement(res["management"], d, config)); err != nil {
349369
return fmt.Errorf("Error reading Cluster: %s", err)
350370
}
@@ -518,6 +538,14 @@ func resourceVmwareengineClusterImport(d *schema.ResourceData, meta interface{})
518538
return []*schema.ResourceData{d}, nil
519539
}
520540

541+
func flattenVmwareengineClusterCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
542+
return v
543+
}
544+
545+
func flattenVmwareengineClusterUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
546+
return v
547+
}
548+
521549
func flattenVmwareengineClusterManagement(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
522550
return v
523551
}

google-beta/services/vmwareengine/resource_vmwareengine_cluster_generated_meta.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fields:
1616
- field: 'autoscaling_settings.cool_down_period'
1717
- field: 'autoscaling_settings.max_cluster_node_count'
1818
- field: 'autoscaling_settings.min_cluster_node_count'
19+
- field: 'create_time'
1920
- field: 'management'
2021
- field: 'name'
2122
provider_only: true
@@ -25,3 +26,4 @@ fields:
2526
provider_only: true
2627
- field: 'state'
2728
- field: 'uid'
29+
- field: 'update_time'

google-beta/services/vmwareengine/resource_vmwareengine_network.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@ func ResourceVmwareengineNetwork() *schema.Resource {
8181
Optional: true,
8282
Description: `User-provided description for this VMware Engine network.`,
8383
},
84+
"create_time": {
85+
Type: schema.TypeString,
86+
Computed: true,
87+
Description: `Creation time of this resource.
88+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
89+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
90+
},
91+
"etag": {
92+
Type: schema.TypeString,
93+
Computed: true,
94+
Description: `Checksum that may be sent on update and delete requests to ensure that the user-provided value is up to date befor
95+
The server computes checksums based on the value of other fields in the request.`,
96+
},
8497
"state": {
8598
Type: schema.TypeString,
8699
Computed: true,
@@ -91,6 +104,13 @@ func ResourceVmwareengineNetwork() *schema.Resource {
91104
Computed: true,
92105
Description: `System-generated unique identifier for the resource.`,
93106
},
107+
"update_time": {
108+
Type: schema.TypeString,
109+
Computed: true,
110+
Description: `Last update time of this resource.
111+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
112+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
113+
},
94114
"vpc_networks": {
95115
Type: schema.TypeList,
96116
Computed: true,
@@ -242,6 +262,12 @@ func resourceVmwareengineNetworkRead(d *schema.ResourceData, meta interface{}) e
242262
return fmt.Errorf("Error reading Network: %s", err)
243263
}
244264

265+
if err := d.Set("create_time", flattenVmwareengineNetworkCreateTime(res["createTime"], d, config)); err != nil {
266+
return fmt.Errorf("Error reading Network: %s", err)
267+
}
268+
if err := d.Set("update_time", flattenVmwareengineNetworkUpdateTime(res["updateTime"], d, config)); err != nil {
269+
return fmt.Errorf("Error reading Network: %s", err)
270+
}
245271
if err := d.Set("description", flattenVmwareengineNetworkDescription(res["description"], d, config)); err != nil {
246272
return fmt.Errorf("Error reading Network: %s", err)
247273
}
@@ -257,6 +283,9 @@ func resourceVmwareengineNetworkRead(d *schema.ResourceData, meta interface{}) e
257283
if err := d.Set("uid", flattenVmwareengineNetworkUid(res["uid"], d, config)); err != nil {
258284
return fmt.Errorf("Error reading Network: %s", err)
259285
}
286+
if err := d.Set("etag", flattenVmwareengineNetworkEtag(res["etag"], d, config)); err != nil {
287+
return fmt.Errorf("Error reading Network: %s", err)
288+
}
260289

261290
return nil
262291
}
@@ -415,6 +444,14 @@ func resourceVmwareengineNetworkImport(d *schema.ResourceData, meta interface{})
415444
return []*schema.ResourceData{d}, nil
416445
}
417446

447+
func flattenVmwareengineNetworkCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
448+
return v
449+
}
450+
451+
func flattenVmwareengineNetworkUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
452+
return v
453+
}
454+
418455
func flattenVmwareengineNetworkDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
419456
return v
420457
}
@@ -458,6 +495,10 @@ func flattenVmwareengineNetworkUid(v interface{}, d *schema.ResourceData, config
458495
return v
459496
}
460497

498+
func flattenVmwareengineNetworkEtag(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
499+
return v
500+
}
501+
461502
func expandVmwareengineNetworkDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
462503
return v, nil
463504
}

google-beta/services/vmwareengine/resource_vmwareengine_network_generated_meta.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ api_service_name: 'vmwareengine.googleapis.com'
55
api_version: 'v1'
66
api_resource_type_kind: 'VmwareEngineNetwork'
77
fields:
8+
- field: 'create_time'
89
- field: 'description'
10+
- field: 'etag'
911
- field: 'location'
1012
provider_only: true
1113
- field: 'name'
1214
provider_only: true
1315
- field: 'state'
1416
- field: 'type'
1517
- field: 'uid'
18+
- field: 'update_time'
1619
- field: 'vpc_networks.network'
1720
- field: 'vpc_networks.type'

google-beta/services/vmwareengine/resource_vmwareengine_private_cloud.go

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,27 @@ the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{v
403403
DiffSuppressFunc: vmwareenginePrivateCloudStandardTypeDiffSuppressFunc,
404404
Description: `Initial type of the private cloud. Possible values: ["STANDARD", "TIME_LIMITED", "STRETCHED"]`,
405405
},
406+
"create_time": {
407+
Type: schema.TypeString,
408+
Computed: true,
409+
Description: `Creation time of this resource.
410+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
411+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
412+
},
413+
"delete_time": {
414+
Type: schema.TypeString,
415+
Computed: true,
416+
Description: `Time when the resource was scheduled for deletion.
417+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
418+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
419+
},
420+
"expire_time": {
421+
Type: schema.TypeString,
422+
Computed: true,
423+
Description: `Time when the resource will be irreversibly deleted.
424+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
425+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
426+
},
406427
"hcx": {
407428
Type: schema.TypeList,
408429
Computed: true,
@@ -473,6 +494,13 @@ the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{v
473494
Computed: true,
474495
Description: `System-generated unique identifier for the resource.`,
475496
},
497+
"update_time": {
498+
Type: schema.TypeString,
499+
Computed: true,
500+
Description: `Last update time of this resource.
501+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
502+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`,
503+
},
476504
"vcenter": {
477505
Type: schema.TypeList,
478506
Computed: true,
@@ -743,6 +771,18 @@ func resourceVmwareenginePrivateCloudRead(d *schema.ResourceData, meta interface
743771
if err := d.Set("description", flattenVmwareenginePrivateCloudDescription(res["description"], d, config)); err != nil {
744772
return fmt.Errorf("Error reading PrivateCloud: %s", err)
745773
}
774+
if err := d.Set("create_time", flattenVmwareenginePrivateCloudCreateTime(res["createTime"], d, config)); err != nil {
775+
return fmt.Errorf("Error reading PrivateCloud: %s", err)
776+
}
777+
if err := d.Set("update_time", flattenVmwareenginePrivateCloudUpdateTime(res["updateTime"], d, config)); err != nil {
778+
return fmt.Errorf("Error reading PrivateCloud: %s", err)
779+
}
780+
if err := d.Set("delete_time", flattenVmwareenginePrivateCloudDeleteTime(res["deleteTime"], d, config)); err != nil {
781+
return fmt.Errorf("Error reading PrivateCloud: %s", err)
782+
}
783+
if err := d.Set("expire_time", flattenVmwareenginePrivateCloudExpireTime(res["expireTime"], d, config)); err != nil {
784+
return fmt.Errorf("Error reading PrivateCloud: %s", err)
785+
}
746786
if err := d.Set("uid", flattenVmwareenginePrivateCloudUid(res["uid"], d, config)); err != nil {
747787
return fmt.Errorf("Error reading PrivateCloud: %s", err)
748788
}
@@ -994,6 +1034,22 @@ func flattenVmwareenginePrivateCloudDescription(v interface{}, d *schema.Resourc
9941034
return v
9951035
}
9961036

1037+
func flattenVmwareenginePrivateCloudCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
1038+
return v
1039+
}
1040+
1041+
func flattenVmwareenginePrivateCloudUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
1042+
return v
1043+
}
1044+
1045+
func flattenVmwareenginePrivateCloudDeleteTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
1046+
return v
1047+
}
1048+
1049+
func flattenVmwareenginePrivateCloudExpireTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
1050+
return v
1051+
}
1052+
9971053
func flattenVmwareenginePrivateCloudUid(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
9981054
return v
9991055
}

google-beta/services/vmwareengine/resource_vmwareengine_private_cloud_generated_meta.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ api_service_name: 'vmwareengine.googleapis.com'
55
api_version: 'v1'
66
api_resource_type_kind: 'PrivateCloud'
77
fields:
8+
- field: 'create_time'
9+
- field: 'delete_time'
810
- field: 'deletion_delay_hours'
911
provider_only: true
1012
- field: 'description'
13+
- field: 'expire_time'
1114
- field: 'hcx.fqdn'
1215
- field: 'hcx.internal_ip'
1316
- field: 'hcx.state'
@@ -46,6 +49,7 @@ fields:
4649
- field: 'state'
4750
- field: 'type'
4851
- field: 'uid'
52+
- field: 'update_time'
4953
- field: 'vcenter.fqdn'
5054
- field: 'vcenter.internal_ip'
5155
- field: 'vcenter.state'

website/docs/r/vmwareengine_cluster.html.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,16 @@ In addition to the arguments listed above, the following computed attributes are
272272

273273
* `id` - an identifier for the resource with format `{{parent}}/clusters/{{name}}`
274274

275+
* `create_time` -
276+
Creation time of this resource.
277+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
278+
up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
279+
280+
* `update_time` -
281+
Last updated time of this resource.
282+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
283+
fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
284+
275285
* `management` -
276286
True if the cluster is a management cluster; false otherwise.
277287
There can only be one management cluster in a private cloud and it has to be the first one.

website/docs/r/vmwareengine_network.html.markdown

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ In addition to the arguments listed above, the following computed attributes are
115115

116116
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/vmwareEngineNetworks/{{name}}`
117117

118+
* `create_time` -
119+
Creation time of this resource.
120+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
121+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
122+
123+
* `update_time` -
124+
Last update time of this resource.
125+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
126+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
127+
118128
* `vpc_networks` -
119129
VMware Engine service VPC networks that provide connectivity from a private cloud to customer projects,
120130
the internet, and other Google Cloud services.
@@ -126,6 +136,10 @@ In addition to the arguments listed above, the following computed attributes are
126136
* `uid` -
127137
System-generated unique identifier for the resource.
128138

139+
* `etag` -
140+
Checksum that may be sent on update and delete requests to ensure that the user-provided value is up to date befor
141+
The server computes checksums based on the value of other fields in the request.
142+
129143

130144
<a name="nested_vpc_networks"></a>The `vpc_networks` block contains:
131145

website/docs/r/vmwareengine_private_cloud.html.markdown

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,26 @@ In addition to the arguments listed above, the following computed attributes are
339339

340340
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/privateClouds/{{name}}`
341341

342+
* `create_time` -
343+
Creation time of this resource.
344+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
345+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
346+
347+
* `update_time` -
348+
Last update time of this resource.
349+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
350+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
351+
352+
* `delete_time` -
353+
Time when the resource was scheduled for deletion.
354+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
355+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
356+
357+
* `expire_time` -
358+
Time when the resource will be irreversibly deleted.
359+
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
360+
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
361+
342362
* `uid` -
343363
System-generated unique identifier for the resource.
344364

0 commit comments

Comments
 (0)