diff --git a/mongodbatlas/clusters.go b/mongodbatlas/clusters.go index eb9683cc0..c56e1dc2c 100644 --- a/mongodbatlas/clusters.go +++ b/mongodbatlas/clusters.go @@ -75,6 +75,8 @@ type ConnectionStrings struct { StandardSrv string `json:"standardSrv,omitempty"` AwsPrivateLink map[string]string `json:"awsPrivateLink,omitempty"` AwsPrivateLinkSrv map[string]string `json:"awsPrivateLinkSrv,omitempty"` + Private string `json:"private,omitempty"` + PrivateSrv string `json:"privateSrv,omitempty"` } // Cluster represents MongoDB cluster. diff --git a/mongodbatlas/clusters_test.go b/mongodbatlas/clusters_test.go index 0559390c6..0ed5b6c60 100644 --- a/mongodbatlas/clusters_test.go +++ b/mongodbatlas/clusters_test.go @@ -36,7 +36,9 @@ func TestClusters_ListClusters(t *testing.T) { }, "awsPrivateLinkSrv": { "vpce-0d00c26273372c6ef": "mongodb+srv://cluster0-pl-0-auylw.mongodb.net" - } + }, + "private": "mongodb://cluster0-shard-00-00-pri.auylw.mongodb.net:27017,cluster0-shard-00-01-pri.auylw.mongodb.net:27017,cluster0-shard-00-02-pri.auylw.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0", + "privateSrv": "mongodb+srv://cluster0-pri.auylw.mongodb.net" }, "diskSizeGB": 160, "encryptionAtRestProvider": "AWS", @@ -84,7 +86,9 @@ func TestClusters_ListClusters(t *testing.T) { }, "awsPrivateLinkSrv": { "vpce-0d00c26273372c6ef": "mongodb+srv://cluster0-pl-0-auylw.mongodb.net" - } + }, + "private": "mongodb://cluster0-shard-00-00-pri.auylw.mongodb.net:27017,cluster0-shard-00-01-pri.auylw.mongodb.net:27017,cluster0-shard-00-02-pri.auylw.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0", + "privateSrv": "mongodb+srv://cluster0-pri.auylw.mongodb.net" }, "diskSizeGB": 160, "encryptionAtRestProvider": "AWS", @@ -134,6 +138,8 @@ func TestClusters_ListClusters(t *testing.T) { StandardSrv: "mongodb+srv://cluster0-auylw.mongodb.net", AwsPrivateLink: map[string]string{"vpce-0d00c26273372c6ef": "mongodb://pl-0-us-east-1-auylw.mongodb.net:1024,pl-0-us-east-1-auylw.mongodb.net:1025,pl-0-us-east-1-auylw.mongodb.net:1026/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0-shard-0"}, AwsPrivateLinkSrv: map[string]string{"vpce-0d00c26273372c6ef": "mongodb+srv://cluster0-pl-0-auylw.mongodb.net"}, + Private: "mongodb://cluster0-shard-00-00-pri.auylw.mongodb.net:27017,cluster0-shard-00-01-pri.auylw.mongodb.net:27017,cluster0-shard-00-02-pri.auylw.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0", + PrivateSrv: "mongodb+srv://cluster0-pri.auylw.mongodb.net", }, DiskSizeGB: pointy.Float64(160), EncryptionAtRestProvider: "AWS", @@ -724,7 +730,9 @@ func TestClusters_Get(t *testing.T) { }, "awsPrivateLinkSrv": { "vpce-0d00c26273372c6ef": "mongodb+srv://cluster0-pl-0-auylw.mongodb.net" - } + }, + "private": "mongodb://cluster0-shard-00-00-pri.auylw.mongodb.net:27017,cluster0-shard-00-01-pri.auylw.mongodb.net:27017,cluster0-shard-00-02-pri.auylw.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0", + "privateSrv": "mongodb+srv://cluster0-pri.auylw.mongodb.net" }, "diskSizeGB": 160, "encryptionAtRestProvider": "AWS", @@ -773,6 +781,8 @@ func TestClusters_Get(t *testing.T) { StandardSrv: "mongodb+srv://cluster0-auylw.mongodb.net", AwsPrivateLink: map[string]string{"vpce-0d00c26273372c6ef": "mongodb://pl-0-us-east-1-auylw.mongodb.net:1024,pl-0-us-east-1-auylw.mongodb.net:1025,pl-0-us-east-1-auylw.mongodb.net:1026/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0-shard-0"}, AwsPrivateLinkSrv: map[string]string{"vpce-0d00c26273372c6ef": "mongodb+srv://cluster0-pl-0-auylw.mongodb.net"}, + Private: "mongodb://cluster0-shard-00-00-pri.auylw.mongodb.net:27017,cluster0-shard-00-01-pri.auylw.mongodb.net:27017,cluster0-shard-00-02-pri.auylw.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0", + PrivateSrv: "mongodb+srv://cluster0-pri.auylw.mongodb.net", }, DiskSizeGB: pointy.Float64(160), EncryptionAtRestProvider: "AWS",