Skip to content

Commit c11fe97

Browse files
committed
fix: updating api and removing recursive delete
1 parent 55f62e2 commit c11fe97

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ require (
7171
)
7272

7373
// for local development, uncomment this
74-
//replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api
74+
replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
44
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
55
github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw=
66
github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
7-
github.com/RedisLabs/rediscloud-go-api v0.36.4 h1:EBoyJ3SyvfX4MjTB5MNs5s+hhYTVSVzjdhNtPJDcfMw=
87
github.com/RedisLabs/rediscloud-go-api v0.36.4/go.mod h1:Hkh3i/EsHnyfgV0ijednbofz/EmZC3sFnSNNruF3G6I=
98
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
109
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=

provider/privatelink/resource_rediscloud_private_link.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func resourceRedisCloudPrivateLinkDelete(ctx context.Context, d *schema.Resource
337337
return diag.FromErr(err)
338338
}
339339

340-
return resourceRedisCloudPrivateLinkDelete(ctx, d, meta)
340+
return diags
341341
}
342342

343343
func createOtherPrincipals(ctx context.Context, api *client.ApiClient, subId int, otherPrincipals []pl.PrivateLinkPrincipal) error {

provider/privatelink/testdata/testPrivateLink.tf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@
6464
# data "rediscloud_private_link_endpoint_script" "endpoint_script" {
6565
# subscription_id = rediscloud_private_link.private_link.subscription_id
6666
# }
67+
#
68+
# output "endpoint_script" {
69+
# value = data.rediscloud_private_link_endpoint_script.endpoint_script
70+
# }
71+
72+
73+
data "rediscloud_private_link_endpoint_script" "endpoint_script" {
74+
subscription_id = 122536
75+
}
6776

68-
data "rediscloud_private_link" "pro_private_link" {
69-
subscription_id = "122401"
77+
output "endpoint_script" {
78+
value = data.rediscloud_private_link_endpoint_script.endpoint_script
7079
}

provider/privatelink/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ func flattenConnections(connections []*pl.PrivateLinkConnection) []map[string]in
158158
for _, connection := range connections {
159159
tf := map[string]interface{}{
160160
"association_id": redis.StringValue(connection.AssociationId),
161-
"connection_id": redis.IntValue(connection.ConnectionId),
161+
"connection_id": redis.StringValue(connection.ConnectionId),
162162
"type": redis.StringValue(connection.Type),
163-
"owner_id": redis.IntValue(connection.OwnerId),
163+
"owner_id": redis.StringValue(connection.OwnerId),
164164
"association_date": redis.StringValue(connection.AssociationDate),
165165
}
166166
tfs = append(tfs, tf)

provider/rediscloud_private_link_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package provider
22

33
import (
44
"fmt"
5-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
65
"os"
76
"testing"
87

8+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1010
)
1111

0 commit comments

Comments
 (0)