From 8966fd2caccb9aeaf30a8c89449e7643152cddaf Mon Sep 17 00:00:00 2001 From: Xu Zhang Date: Wed, 18 Dec 2024 17:09:00 +0800 Subject: [PATCH] update documentation and pointer utils --- ...work_outbound_rule_private_endpoint_resource.go | 14 +++----------- ...rk_outbound_rule_private_endpoint.html.markdown | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/internal/services/machinelearning/machine_learning_workspace_network_outbound_rule_private_endpoint_resource.go b/internal/services/machinelearning/machine_learning_workspace_network_outbound_rule_private_endpoint_resource.go index 03adec9bfad7..69c37c205c8d 100644 --- a/internal/services/machinelearning/machine_learning_workspace_network_outbound_rule_private_endpoint_resource.go +++ b/internal/services/machinelearning/machine_learning_workspace_network_outbound_rule_private_endpoint_resource.go @@ -203,17 +203,9 @@ func (r WorkspaceNetworkOutboundRulePrivateEndpoint) Read() sdk.ResourceFunc { if model := resp.Model; model != nil { if props := model.Properties; props != nil { if prop, ok := props.(managednetwork.PrivateEndpointOutboundRule); ok && prop.Destination != nil { - if prop.Destination.SparkEnabled != nil { - state.SparkEnabled = *prop.Destination.SparkEnabled - } - - if prop.Destination.SubresourceTarget != nil { - state.SubresourceTarget = *prop.Destination.SubresourceTarget - } - - if prop.Destination.ServiceResourceId != nil { - state.ServiceResourceId = *prop.Destination.ServiceResourceId - } + state.SparkEnabled = pointer.From(prop.Destination.SparkEnabled) + state.SubresourceTarget = pointer.From(prop.Destination.SubresourceTarget) + state.ServiceResourceId = pointer.From(prop.Destination.ServiceResourceId) } } } diff --git a/website/docs/r/machine_learning_workspace_network_outbound_rule_private_endpoint.html.markdown b/website/docs/r/machine_learning_workspace_network_outbound_rule_private_endpoint.html.markdown index 52c5e4f6bbe4..cdbbba082b32 100644 --- a/website/docs/r/machine_learning_workspace_network_outbound_rule_private_endpoint.html.markdown +++ b/website/docs/r/machine_learning_workspace_network_outbound_rule_private_endpoint.html.markdown @@ -115,7 +115,6 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: * `create` - (Defaults to 30 minutes) Used when creating the Machine Learning Workspace Network Outbound Rule Private Endpoint. -* `update` - (Defaults to 30 minutes) Used when updating the Machine Learning Workspace Network Outbound Rule Private Endpoint. * `read` - (Defaults to 5 minutes) Used when retrieving the Machine Learning Workspace Network Outbound Rule Private Endpoint. * `delete` - (Defaults to 30 minutes) Used when deleting the Machine Learning Workspace Network Outbound Rule Private Endpoint.