|
4 | 4 | "context"
|
5 | 5 | "errors"
|
6 | 6 | "fmt"
|
7 |
| - "net/url" |
8 | 7 | "strings"
|
9 | 8 | "time"
|
10 | 9 |
|
@@ -136,9 +135,8 @@ func resourceMongoDBAtlasPrivateEndpointServiceLinkRead(d *schema.ResourceData,
|
136 | 135 | privateLinkID := ids["private_link_id"]
|
137 | 136 | endpointServiceID := ids["endpoint_service_id"]
|
138 | 137 | providerName := ids["provider_name"]
|
139 |
| - encodedEndpointID := url.PathEscape(endpointServiceID) |
140 | 138 |
|
141 |
| - privateEndpoint, _, err := conn.PrivateEndpoints.GetOnePrivateEndpoint(context.Background(), projectID, providerName, privateLinkID, encodedEndpointID) |
| 139 | + privateEndpoint, _, err := conn.PrivateEndpoints.GetOnePrivateEndpoint(context.Background(), projectID, providerName, privateLinkID, endpointServiceID) |
142 | 140 | if err != nil {
|
143 | 141 | return fmt.Errorf(errorServiceEndpointRead, endpointServiceID, err)
|
144 | 142 | }
|
@@ -190,10 +188,9 @@ func resourceMongoDBAtlasPrivateEndpointServiceLinkDelete(d *schema.ResourceData
|
190 | 188 | privateLinkID := ids["private_link_id"]
|
191 | 189 | endpointServiceID := ids["endpoint_service_id"]
|
192 | 190 | providerName := ids["provider_name"]
|
193 |
| - encodedEndpointID := url.PathEscape(endpointServiceID) |
194 | 191 |
|
195 | 192 | if endpointServiceID != "" {
|
196 |
| - _, err := conn.PrivateEndpoints.DeleteOnePrivateEndpoint(context.Background(), projectID, providerName, privateLinkID, encodedEndpointID) |
| 193 | + _, err := conn.PrivateEndpoints.DeleteOnePrivateEndpoint(context.Background(), projectID, providerName, privateLinkID, endpointServiceID) |
197 | 194 | if err != nil {
|
198 | 195 | return fmt.Errorf(errorEndpointDelete, endpointServiceID, err)
|
199 | 196 | }
|
@@ -229,9 +226,8 @@ func resourceMongoDBAtlasPrivateEndpointServiceLinkImportState(d *schema.Resourc
|
229 | 226 | privateLinkID := parts[1]
|
230 | 227 | endpointServiceID := parts[2]
|
231 | 228 | providerName := parts[3]
|
232 |
| - encodedEndpointID := url.PathEscape(endpointServiceID) |
233 | 229 |
|
234 |
| - _, _, err := conn.PrivateEndpoints.GetOnePrivateEndpoint(context.Background(), projectID, providerName, privateLinkID, encodedEndpointID) |
| 230 | + _, _, err := conn.PrivateEndpoints.GetOnePrivateEndpoint(context.Background(), projectID, providerName, privateLinkID, endpointServiceID) |
235 | 231 | if err != nil {
|
236 | 232 | return nil, fmt.Errorf(errorServiceEndpointRead, endpointServiceID, err)
|
237 | 233 | }
|
|
0 commit comments