Skip to content

Commit 567812f

Browse files
committed
Merge branch 'master' into remove_lint_exceptions
* master: feat: Support configuring BYOK encryption on search nodes (#3199) chore: Updates Atlas Go SDK (#3235) # Conflicts: # internal/testutil/acc/advanced_cluster.go
2 parents 4c27f7d + 584f6fb commit 567812f

File tree

239 files changed

+547
-517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+547
-517
lines changed

.changelog/3142.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
resource/mongodbatlas_encryption_at_rest: Adds `enabled_for_search_nodes` attribute
3+
```
4+
5+
```release-note:enhancement
6+
data-source/mongodbatlas_encryption_at_rest: Adds `enabled_for_search_nodes` attribute
7+
```

.changelog/3152.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
resource/mongodbatlas_search_deployment: Adds `encryption_at_rest_provider` computed attribute
3+
```
4+
5+
```release-note:enhancement
6+
data-source/mongodbatlas_search_deployment: Adds `encryption_at_rest_provider` computed attribute
7+
```

docs/data-sources/encryption_at_rest.md

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ resource "mongodbatlas_encryption_at_rest" "test" {
4141
region = var.atlas_region
4242
role_id = mongodbatlas_cloud_provider_access_authorization.auth_role.role_id
4343
}
44+
45+
enabled_for_search_nodes = true
4446
}
4547
4648
resource "mongodbatlas_advanced_cluster" "cluster" {
@@ -135,6 +137,7 @@ output "is_gcp_encryption_at_rest_valid" {
135137

136138
- `aws_kms_config` (Attributes) Amazon Web Services (AWS) KMS configuration details and encryption at rest configuration set for the specified project. (see [below for nested schema](#nestedatt--aws_kms_config))
137139
- `azure_key_vault_config` (Attributes) Details that define the configuration of Encryption at Rest using Azure Key Vault (AKV). (see [below for nested schema](#nestedatt--azure_key_vault_config))
140+
- `enabled_for_search_nodes` (Boolean) Flag that indicates whether Encryption at Rest for Dedicated Search Nodes is enabled in the specified project.
138141
- `google_cloud_kms_config` (Attributes) Details that define the configuration of Encryption at Rest using Google Cloud Key Management Service (KMS). (see [below for nested schema](#nestedatt--google_cloud_kms_config))
139142
- `id` (String) The ID of this resource.
140143

docs/data-sources/search_deployment.md

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ data "mongodbatlas_search_deployment" "example" {
4646
output "mongodbatlas_search_deployment_id" {
4747
value = data.mongodbatlas_search_deployment.example.id
4848
}
49+
50+
output "mongodbatlas_search_deployment_encryption_at_rest_provider" {
51+
value = data.mongodbatlas_search_deployment.example.encryption_at_rest_provider
52+
}
4953
```
5054

5155
<!-- schema generated by tfplugindocs -->
@@ -58,6 +62,7 @@ output "mongodbatlas_search_deployment_id" {
5862

5963
### Read-Only
6064

65+
- `encryption_at_rest_provider` (String) Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
6166
- `id` (String) Unique 24-hexadecimal digit string that identifies the search deployment.
6267
- `specs` (Attributes List) List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element. (see [below for nested schema](#nestedatt--specs))
6368
- `state_name` (String) Human-readable label that indicates the current operating condition of this search deployment.

docs/resources/encryption_at_rest.md

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ resource "mongodbatlas_encryption_at_rest" "test" {
5656
region = var.atlas_region
5757
role_id = mongodbatlas_cloud_provider_access_authorization.auth_role.role_id
5858
}
59+
60+
enabled_for_search_nodes = true
5961
}
6062
6163
resource "mongodbatlas_advanced_cluster" "cluster" {
@@ -155,6 +157,7 @@ resource "mongodbatlas_encryption_at_rest" "test" {
155157

156158
- `aws_kms_config` (Block List) Amazon Web Services (AWS) KMS configuration details and encryption at rest configuration set for the specified project. (see [below for nested schema](#nestedblock--aws_kms_config))
157159
- `azure_key_vault_config` (Block List) Details that define the configuration of Encryption at Rest using Azure Key Vault (AKV). (see [below for nested schema](#nestedblock--azure_key_vault_config))
160+
- `enabled_for_search_nodes` (Boolean) Flag that indicates whether Encryption at Rest for Dedicated Search Nodes is enabled in the specified project.
158161
- `google_cloud_kms_config` (Block List) Details that define the configuration of Encryption at Rest using Google Cloud Key Management Service (KMS). (see [below for nested schema](#nestedblock--google_cloud_kms_config))
159162

160163
### Read-Only

docs/resources/search_deployment.md

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ data "mongodbatlas_search_deployment" "example" {
5151
output "mongodbatlas_search_deployment_id" {
5252
value = data.mongodbatlas_search_deployment.example.id
5353
}
54+
55+
output "mongodbatlas_search_deployment_encryption_at_rest_provider" {
56+
value = data.mongodbatlas_search_deployment.example.encryption_at_rest_provider
57+
}
5458
```
5559

5660
<!-- schema generated by tfplugindocs -->
@@ -68,6 +72,7 @@ output "mongodbatlas_search_deployment_id" {
6872

6973
### Read-Only
7074

75+
- `encryption_at_rest_provider` (String) Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
7176
- `id` (String) Unique 24-hexadecimal digit string that identifies the search deployment.
7277
- `state_name` (String) Human-readable label that indicates the current operating condition of this search deployment.
7378

examples/mongodbatlas_encryption_at_rest/aws/atlas-cluster/main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "mongodbatlas_encryption_at_rest" "test" {
2121
region = var.atlas_region
2222
role_id = mongodbatlas_cloud_provider_access_authorization.auth_role.role_id
2323
}
24+
25+
enabled_for_search_nodes = true
2426
}
2527

2628
resource "mongodbatlas_advanced_cluster" "cluster" {

examples/mongodbatlas_search_deployment/main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,7 @@ data "mongodbatlas_search_deployment" "example" {
4040
output "mongodbatlas_search_deployment_id" {
4141
value = data.mongodbatlas_search_deployment.example.id
4242
}
43+
44+
output "mongodbatlas_search_deployment_encryption_at_rest_provider" {
45+
value = data.mongodbatlas_search_deployment.example.encryption_at_rest_provider
46+
}

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/huandu/xstrings v1.5.0
2525
github.com/jarcoal/httpmock v1.3.1
2626
github.com/mongodb-forks/digest v1.1.0
27-
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250324083818-6cadaa35b50e
27+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250402092819-ea391c348e21
2828
github.com/pb33f/libopenapi v0.21.8
2929
github.com/sebdah/goldie/v2 v2.5.5
3030
github.com/spf13/cast v1.7.1
@@ -35,7 +35,7 @@ require (
3535
go.mongodb.org/atlas-sdk/v20240530005 v20240530005.0.0
3636
go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.0
3737
go.mongodb.org/atlas-sdk/v20241113005 v20241113005.0.0
38-
go.mongodb.org/atlas-sdk/v20250312001 v20250312001.1.0
38+
go.mongodb.org/atlas-sdk/v20250312002 v20250312002.0.0
3939
go.mongodb.org/realm v0.1.0
4040
gopkg.in/yaml.v3 v3.0.1
4141
)

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
655655
github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=
656656
github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc=
657657
github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg=
658-
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250324083818-6cadaa35b50e h1:nJXojVCC/snhHz70EidD16DtxHB7qbJnJETz+02+5dk=
659-
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250324083818-6cadaa35b50e/go.mod h1:7vLdgdyq+HUqWNR8/7pvfwISyYldFqCeeQQ6qQQsdJs=
658+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250402092819-ea391c348e21 h1:gQBUnaR0gRt9Wapl6I+V5eHxRIS596+aRlLM8jb7YUo=
659+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250402092819-ea391c348e21/go.mod h1:7vLdgdyq+HUqWNR8/7pvfwISyYldFqCeeQQ6qQQsdJs=
660660
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
661661
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
662662
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
@@ -828,8 +828,8 @@ go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.0 h1:EGTT54tKbDbkhhK+jH5AqI
828828
go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.0/go.mod h1:UTNpAyiKm/7utu+Nl0FafgjgvS+ONNGEoxBT5g/40WM=
829829
go.mongodb.org/atlas-sdk/v20241113005 v20241113005.0.0 h1:aaU2E4rtzYXuEDxv9MoSON2gOEAA9M2gsDf2CqjcGj8=
830830
go.mongodb.org/atlas-sdk/v20241113005 v20241113005.0.0/go.mod h1:eV9REWR36iVMrpZUAMZ5qPbXEatoVfmzwT+Ue8yqU+U=
831-
go.mongodb.org/atlas-sdk/v20250312001 v20250312001.1.0 h1:yJeENElweq4Ba+bGeUVVA+wC+B7XsVW4+nEpTgjdkLE=
832-
go.mongodb.org/atlas-sdk/v20250312001 v20250312001.1.0/go.mod h1:+Qr8xVyWeLRt+PV3hrD1Dy080NIkNuV1eoNwEcrSzIo=
831+
go.mongodb.org/atlas-sdk/v20250312002 v20250312002.0.0 h1:KX8PrYp3/PCSxG4NbGLcc3+EsNcfyhcvylGbe/oRlx8=
832+
go.mongodb.org/atlas-sdk/v20250312002 v20250312002.0.0/go.mod h1:HHCmHxHPdJRr1bUXlvRIZbm7M4gRujjur1GnjE44YgA=
833833
go.mongodb.org/realm v0.1.0 h1:zJiXyLaZrznQ+Pz947ziSrDKUep39DO4SfA0Fzx8M4M=
834834
go.mongodb.org/realm v0.1.0/go.mod h1:4Vj6iy+Puo1TDERcoh4XZ+pjtwbOzPpzqy3Cwe8ZmDM=
835835
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=

internal/common/conversion/flatten_expand.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package conversion
33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
55

6-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
6+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
77
)
88

99
func FlattenLinks(links []admin.Link) []map[string]string {

internal/common/conversion/tags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/hashicorp/terraform-plugin-framework/attr"
77
"github.com/hashicorp/terraform-plugin-framework/types"
8-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
8+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
99
)
1010

1111
func NewResourceTags(ctx context.Context, tags types.Map) *[]admin.ResourceTag {

internal/common/conversion/tags_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/hashicorp/terraform-plugin-framework/types"
88
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
99
"github.com/stretchr/testify/assert"
10-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
10+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1111
)
1212

1313
func TestNewResourceTags(t *testing.T) {

internal/common/update/patch_payload_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/update"
99
"github.com/stretchr/testify/assert"
1010
"github.com/stretchr/testify/require"
11-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
11+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1212
)
1313

1414
func TestPatchReplicationSpecs(t *testing.T) {

internal/config/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
1414
admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
1515
admin20241113 "go.mongodb.org/atlas-sdk/v20241113005/admin"
16-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
16+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1717
matlasClient "go.mongodb.org/atlas/mongodbatlas"
1818
realmAuth "go.mongodb.org/realm/auth"
1919
"go.mongodb.org/realm/realm"

internal/service/accesslistapikey/data_source_accesslist_api_keys.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
1111
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
1212

13-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
13+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1414
)
1515

1616
func PluralDataSource() *schema.Resource {

internal/service/accesslistapikey/resource_access_list_api_key.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"net"
88
"strings"
99

10-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
10+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1111

1212
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -170,7 +170,7 @@ func resourceDelete(ctx context.Context, d *schema.ResourceData, meta any) diag.
170170
apiKeyID := ids["api_key_id"]
171171
ipAddress := ids["entry"]
172172

173-
_, _, err := connV2.ProgrammaticAPIKeysApi.DeleteApiKeyAccessListEntry(ctx, orgID, apiKeyID, ipAddress).Execute()
173+
_, err := connV2.ProgrammaticAPIKeysApi.DeleteApiKeyAccessListEntry(ctx, orgID, apiKeyID, ipAddress).Execute()
174174
if err != nil {
175175
return diag.FromErr(fmt.Errorf("error deleting API Key: %s", err))
176176
}

internal/service/advancedcluster/data_source_advanced_clusters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"log"
77

88
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
9-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
9+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1010

1111
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1212
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"

internal/service/advancedcluster/model_advanced_cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"time"
1414

1515
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
16-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
16+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1717

1818
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1919
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"

internal/service/advancedcluster/model_advanced_cluster_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"testing"
88

99
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
10-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
11-
"go.mongodb.org/atlas-sdk/v20250312001/mockadmin"
10+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
11+
"go.mongodb.org/atlas-sdk/v20250312002/mockadmin"
1212

1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1414
"github.com/stretchr/testify/assert"

internal/service/advancedcluster/model_flex.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package advancedcluster
22

33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
5-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
5+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
66

77
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
88
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"

internal/service/advancedcluster/model_sdk_version_conversion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package advancedcluster
22

33
import (
44
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
5-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
5+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
66

77
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
88
)

internal/service/advancedcluster/resource_advanced_cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
1515
admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
16-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
16+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1717

1818
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1919
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
@@ -1038,7 +1038,7 @@ func HandlePinnedFCVUpdate(ctx context.Context, connV2 *admin.APIClient, project
10381038
}
10391039
} else {
10401040
// pinned_fcv has been removed from the config so unpin method is called
1041-
if _, _, err := connV2.ClustersApi.UnpinFeatureCompatibilityVersion(ctx, projectID, clusterName).Execute(); err != nil {
1041+
if _, err := connV2.ClustersApi.UnpinFeatureCompatibilityVersion(ctx, projectID, clusterName).Execute(); err != nil {
10421042
return diag.FromErr(fmt.Errorf(errorUpdate, clusterName, err))
10431043
}
10441044
}

internal/service/advancedcluster/resource_advanced_cluster_test.go

+3-30
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
1414
mockadmin20240530 "go.mongodb.org/atlas-sdk/v20240530005/mockadmin"
15-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
15+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1616

1717
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1818
"github.com/stretchr/testify/assert"
@@ -136,7 +136,7 @@ func testAccAdvancedClusterFlexUpgrade(t *testing.T, instanceSize string, includ
136136
}
137137
if includeDedicated {
138138
steps = append(steps, resource.TestStep{
139-
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, configBasicDedicated(projectID, clusterName, defaultZoneName)),
139+
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, acc.ConfigBasicDedicated(projectID, clusterName, defaultZoneName)),
140140
Check: checksBasicDedicated(projectID, clusterName),
141141
})
142142
}
@@ -171,7 +171,7 @@ func TestAccMockableAdvancedCluster_tenantUpgrade(t *testing.T) {
171171
Check: checkTenant(true, projectID, clusterName),
172172
},
173173
{
174-
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, configBasicDedicated(projectID, clusterName, defaultZoneName)),
174+
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, acc.ConfigBasicDedicated(projectID, clusterName, defaultZoneName)),
175175
Check: checksBasicDedicated(projectID, clusterName),
176176
},
177177
acc.TestStepImportCluster(resourceName),
@@ -1659,33 +1659,6 @@ func checkTenant(usePreviewProvider bool, projectID, name string) resource.TestC
16591659
pluralChecks...)
16601660
}
16611661

1662-
func configBasicDedicated(projectID, name, zoneName string) string {
1663-
zoneNameLine := ""
1664-
if zoneName != "" {
1665-
zoneNameLine = fmt.Sprintf("zone_name = %q", zoneName)
1666-
}
1667-
return fmt.Sprintf(`
1668-
resource "mongodbatlas_advanced_cluster" "test" {
1669-
project_id = %[1]q
1670-
name = %[2]q
1671-
cluster_type = "REPLICASET"
1672-
1673-
replication_specs {
1674-
region_configs {
1675-
priority = 7
1676-
provider_name = "AWS"
1677-
region_name = "US_EAST_1"
1678-
electable_specs {
1679-
node_count = 3
1680-
instance_size = "M10"
1681-
}
1682-
}
1683-
%[3]s
1684-
}
1685-
}
1686-
`, projectID, name, zoneNameLine) + dataSourcesTFNewSchema
1687-
}
1688-
16891662
func checksBasicDedicated(projectID, name string) resource.TestCheckFunc {
16901663
originalChecks := checkTenant(true, projectID, name)
16911664
checkMap := map[string]string{

internal/service/advancedcluster/resource_update_logic.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
88
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
99
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedclustertpf"
10-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
10+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1111
)
1212

1313
func noIDsPopulatedInReplicationSpecs(replicationSpecs *[]admin.ReplicationSpec20240805) bool {

internal/service/advancedcluster/resource_update_logic_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
77
"github.com/stretchr/testify/assert"
8-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
8+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
99
)
1010

1111
func TestSyncAutoScalingConfigs(t *testing.T) {

internal/service/advancedcluster/tpf_adapter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package advancedcluster
33
import (
44
"context"
55

6-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
6+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
77

88
fwdiag "github.com/hashicorp/terraform-plugin-framework/diag"
99
v2diag "github.com/hashicorp/terraform-plugin-sdk/v2/diag"

internal/service/advancedclustertpf/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
1010
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/flexcluster"
1111
"github.com/spf13/cast"
12-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
12+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1313
)
1414

1515
const (

internal/service/advancedclustertpf/common_admin_sdk.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
88
admin20240805 "go.mongodb.org/atlas-sdk/v20240805005/admin"
9-
"go.mongodb.org/atlas-sdk/v20250312001/admin"
9+
"go.mongodb.org/atlas-sdk/v20250312002/admin"
1010

1111
"github.com/hashicorp/terraform-plugin-framework/diag"
1212

@@ -148,7 +148,7 @@ func PinFCV(ctx context.Context, api admin.ClustersApi, projectID, clusterName,
148148
req := admin.PinFCV{
149149
ExpirationDate: &expirationTime,
150150
}
151-
if _, _, err := api.PinFeatureCompatibilityVersion(ctx, projectID, clusterName, &req).Execute(); err != nil {
151+
if _, err := api.PinFeatureCompatibilityVersion(ctx, projectID, clusterName, &req).Execute(); err != nil {
152152
return err
153153
}
154154
return nil

0 commit comments

Comments
 (0)