Skip to content

Commit 3cb356e

Browse files
committed
Merge branch 'master' into CLOUDP-278652_use_schemas
* master: ci: fix env-vars for azure QA (#2709) build(deps): bump go.mongodb.org/atlas-sdk (#2715) chore: Adds SDK Preview (#2713) chore: Supports running Test Suite in QA on sundays (#2711) wait in second test (#2707) build(deps): bump go.mongodb.org/atlas-sdk (#2705) chore: Use `qa` for TestSuite on Sundays (#2701) chore: Updates CHANGELOG.md for #2698 feat: Adds `is_slow_operation_thresholding_enabled` attribute to `mongodbatlas_project` (#2698) Remove RemoveResource from Create and Update (#2694) sleep first time only (#2696) fix: Ensures event_trigger `disabled` is included in the PUT payload (#2690) chore: Bump srvaroa/labeler from 1.11.0 to 1.11.1 (#2695) build(deps): bump go.mongodb.org/atlas-sdk (#2686)
2 parents b5ebb69 + 6a23a2e commit 3cb356e

File tree

191 files changed

+412
-277
lines changed

Some content is hidden

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

191 files changed

+412
-277
lines changed

.changelog/2690.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
resource/mongodbatlas_event_trigger: Always includes `disabled` in the PUT payload
3+
```

.changelog/2698.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```release-note:enhancement
2+
resource/mongodbatlas_project: Adds `is_slow_operation_thresholding_enabled` attribute
3+
```
4+
5+
```release-note:enhancement
6+
data-source/mongodbatlas_project: Adds `is_slow_operation_thresholding_enabled` attribute
7+
```
8+
9+
```release-note:enhancement
10+
data-source/mongodbatlas_projects: Adds `is_slow_operation_thresholding_enabled` attribute
11+
```

.github/workflows/acceptance-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ jobs:
9898
mongodb_atlas_project_owner_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_PROJECT_OWNER_ID_QA || vars.MONGODB_ATLAS_PROJECT_OWNER_ID }}
9999
mongodb_atlas_teams_ids: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_TEAMS_IDS_QA || vars.MONGODB_ATLAS_TEAMS_IDS }}
100100
azure_atlas_app_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.AZURE_ATLAS_APP_ID_QA || vars.AZURE_ATLAS_APP_ID }}
101-
azure_service_principal_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.AZURE_SERVICE_PRINCIPAL_ID_QA || vars.AZURE_SERVICE_PRINCIPAL_ID }}
102-
azure_tenant_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.AZURE_TENANT_ID_QA || vars.AZURE_TENANT_ID }}
101+
azure_service_principal_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.AZURE_SERVICE_PRINCIPAL_ID_APP_QA || vars.AZURE_SERVICE_PRINCIPAL_ID }}
102+
azure_tenant_id: ${{ vars.AZURE_TENANT_ID }}
103103
aws_secret_name: ${{ inputs.atlas_cloud_env == 'qa' && vars.AWS_SECRET_NAME_QA || vars.AWS_SECRET_NAME }}
104104
mongodb_atlas_federation_settings_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FEDERATION_SETTINGS_ID_QA || vars.MONGODB_ATLAS_FEDERATION_SETTINGS_ID }}
105105
mongodb_atlas_federated_okta_idp_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FEDERATED_OKTA_IDP_ID_QA || vars.MONGODB_ATLAS_FEDERATED_OKTA_IDP_ID }}

.github/workflows/pull-request-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
contents: read
7676
pull-requests: write # Needed by labeler
7777
steps:
78-
- uses: srvaroa/labeler@bfe288801b8091b6a70e67f3ce7c9e87c88921cf
78+
- uses: srvaroa/labeler@29471ee1118fa4e10b011964e6e8fe2fd243e700
7979
env:
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8181
with:

.github/workflows/terraform-compatibility-matrix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: ./.github/workflows/test-suite.yml
4848
with:
4949
terraform_matrix: '["${{ matrix.terraform_version }}"]'
50-
atlas_cloud_env: ${{ inputs.atlas_cloud_env }}
50+
atlas_cloud_env: ${{ inputs.atlas_cloud_env || 'dev' }}
5151
send_notification: false
5252

5353
slack-notification:

.github/workflows/test-suite.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: 'Test Suite'
22

3-
# Runs acceptance and migrations tests with a set of terraform versions and provider versions (used for migration tests). This worflow is scheduled daily except Saturdays, but can also be run manually.
3+
# Runs acceptance and migrations tests with a set of terraform versions and provider versions (used for migration tests).
4+
# This worflow is scheduled daily and runs against dev every day except for Sunday when we run against QA. It can also be run manually.
5+
# The 1st day of the month we run terraform-compatibility-matrix.yml and therefore, we skip the test-suite (see shedule->cron below).
46
on:
57
workflow_dispatch:
68
inputs:
@@ -34,44 +36,46 @@ on:
3436

3537
schedule:
3638
- cron: "0 0 2-31 * *" # workflow runs every day at midnight UTC except on the first day of the month
37-
3839
concurrency:
3940
group: '${{ github.workflow }}'
4041
cancel-in-progress: false
4142

4243
jobs:
43-
versions:
44+
variables:
4445
env:
4546
schedule_terraform_matrix: '["${{ vars.TF_VERSION_LATEST }}"]'
4647
schedule_provider_matrix: '[""]' # "" for latest version
4748
runs-on: ubuntu-latest
4849
outputs:
4950
terraform_matrix: ${{ inputs.terraform_matrix || env.schedule_terraform_matrix }}
5051
provider_matrix: ${{ inputs.provider_matrix || env.schedule_provider_matrix }}
52+
day: ${{ steps.set_day.outputs.DAY }}
5153
steps:
52-
- if: false
53-
run: echo jobs need steps
54-
54+
- name: set day
55+
id: set_day
56+
run: |
57+
echo "DAY=$(date +'%a')"
58+
echo "DAY=$(date +'%a')" >> "$GITHUB_OUTPUT"
5559
clean-before:
5660
secrets: inherit
5761
uses: ./.github/workflows/cleanup-test-env.yml
5862

5963
tests:
60-
needs: [clean-before, versions]
64+
needs: [clean-before, variables]
6165
if: ${{ !cancelled() }}
6266
strategy:
6367
max-parallel: 1
6468
fail-fast: false
6569
matrix:
66-
terraform_version: ${{ fromJSON(needs.versions.outputs.terraform_matrix) }}
67-
provider_version: ${{ fromJSON(needs.versions.outputs.provider_matrix) }}
70+
terraform_version: ${{ fromJSON(needs.variables.outputs.terraform_matrix) }}
71+
provider_version: ${{ fromJSON(needs.variables.outputs.provider_matrix) }}
6872
name: tests-${{ matrix.terraform_version || 'latest' }}-${{ matrix.provider_version || 'latest' }}
6973
secrets: inherit
7074
uses: ./.github/workflows/acceptance-tests.yml
7175
with:
7276
terraform_version: ${{ matrix.terraform_version }}
7377
provider_version: ${{ matrix.provider_version }}
74-
atlas_cloud_env: ${{ inputs.atlas_cloud_env }}
78+
atlas_cloud_env: ${{ inputs.atlas_cloud_env || needs.variables.outputs.day == 'Sun' && 'qa' }}
7579

7680
clean-after:
7781
needs: tests

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ ENHANCEMENTS:
44

55
* data-source/mongodbatlas_advanced_cluster: Adds new `config_server_management_mode` and `config_server_type` fields ([#2670](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2670))
66
* data-source/mongodbatlas_advanced_clusters: Adds new `config_server_management_mode` and `config_server_type` fields ([#2670](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2670))
7+
* data-source/mongodbatlas_project: Adds `is_slow_operation_thresholding_enabled` attribute ([#2698](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2698))
8+
* data-source/mongodbatlas_projects: Adds `is_slow_operation_thresholding_enabled` attribute ([#2698](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2698))
79
* resource/mongodbatlas_advanced_cluster: Adds new `config_server_management_mode` and `config_server_type` fields ([#2670](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2670))
10+
* resource/mongodbatlas_project: Adds `is_slow_operation_thresholding_enabled` attribute ([#2698](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2698))
11+
12+
BUG FIXES:
13+
14+
* resource/mongodbatlas_event_trigger: Always includes `disabled` in the PUT payload ([#2690](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2690))
15+
* resource/mongodbatlas_organization: Avoids inconsistent result returned by provider when `USER_NOT_FOUND` ([#2684](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2684))
816

917
## 1.21.1 (October 09, 2024)
1018

docs/data-sources/project.md

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ In addition to all arguments above, the following attributes are exported:
9090
* `is_realtime_performance_panel_enabled` - Flag that indicates whether to enable Real Time Performance Panel for the project. If enabled, you can see real time metrics from your MongoDB database.
9191
* `is_schema_advisor_enabled` - Flag that indicates whether to enable Schema Advisor for the project. If enabled, you receive customized recommendations to optimize your data model and enhance performance. Disable this setting to disable schema suggestions in the [Performance Advisor](https://www.mongodb.com/docs/atlas/performance-advisor/#std-label-performance-advisor) and the [Data Explorer](https://www.mongodb.com/docs/atlas/atlas-ui/#std-label-atlas-ui).
9292
* `region_usage_restrictions` - If GOV_REGIONS_ONLY the project can be used for government regions only, otherwise defaults to standard regions. For more information see [MongoDB Atlas for Government](https://www.mongodb.com/docs/atlas/government/api/#creating-a-project).
93+
* `is_slow_operation_thresholding_enabled` - Flag that enables MongoDB Cloud to use its slow operation threshold for the specified project. The threshold determines which operations the Performance Advisor and Query Profiler considers slow. When enabled, MongoDB Cloud uses the average execution time for operations on your cluster to determine slow-running queries. As a result, the threshold is more pertinent to your cluster workload. The slow operation threshold is enabled by default for dedicated clusters (M10+). When disabled, MongoDB Cloud considers any operation that takes longer than 100 milliseconds to be slow. To use this resource, the requesting API Key must have the Project Owner role.
9394

9495

9596
### Teams

docs/data-sources/projects.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ data "mongodbatlas_projects" "test" {
6565
* `is_realtime_performance_panel_enabled` - Flag that indicates whether to enable Real Time Performance Panel for the project. If enabled, you can see real time metrics from your MongoDB database.
6666
* `is_schema_advisor_enabled` - Flag that indicates whether to enable Schema Advisor for the project. If enabled, you receive customized recommendations to optimize your data model and enhance performance. Disable this setting to disable schema suggestions in the [Performance Advisor](https://www.mongodb.com/docs/atlas/performance-advisor/#std-label-performance-advisor) and the [Data Explorer](https://www.mongodb.com/docs/atlas/atlas-ui/#std-label-atlas-ui).
6767
* `region_usage_restrictions` - If GOV_REGIONS_ONLY the project can be used for government regions only, otherwise defaults to standard regions. For more information see [MongoDB Atlas for Government](https://www.mongodb.com/docs/atlas/government/api/#creating-a-project).
68-
68+
* `is_slow_operation_thresholding_enabled` - Flag that enables MongoDB Cloud to use its slow operation threshold for the specified project. The threshold determines which operations the Performance Advisor and Query Profiler considers slow. When enabled, MongoDB Cloud uses the average execution time for operations on your cluster to determine slow-running queries. As a result, the threshold is more pertinent to your cluster workload. The slow operation threshold is enabled by default for dedicated clusters (M10+). When disabled, MongoDB Cloud considers any operation that takes longer than 100 milliseconds to be slow. To use this resource, the requesting API Key must have the Project Owner role.
6969

7070
### Teams
7171

docs/resources/project.md

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resource "mongodbatlas_project" "test" {
4141
is_performance_advisor_enabled = true
4242
is_realtime_performance_panel_enabled = true
4343
is_schema_advisor_enabled = true
44+
is_slow_operation_thresholding_enabled = true
4445
}
4546
```
4647

@@ -58,6 +59,7 @@ resource "mongodbatlas_project" "test" {
5859
* `is_realtime_performance_panel_enabled` - (Optional) Flag that indicates whether to enable Real Time Performance Panel for the project. If enabled, you can see real time metrics from your MongoDB database. By default, this flag is set to true.
5960
* `is_schema_advisor_enabled` - (Optional) Flag that indicates whether to enable Schema Advisor for the project. If enabled, you receive customized recommendations to optimize your data model and enhance performance. Disable this setting to disable schema suggestions in the [Performance Advisor](https://www.mongodb.com/docs/atlas/performance-advisor/#std-label-performance-advisor) and the [Data Explorer](https://www.mongodb.com/docs/atlas/atlas-ui/#std-label-atlas-ui). By default, this flag is set to true.
6061
* `region_usage_restrictions` - (Optional - set value to GOV_REGIONS_ONLY) Designates that this project can be used for government regions only. If not set the project will default to standard regions. You cannot deploy clusters across government and standard regions in the same project. AWS is the only cloud provider for AtlasGov. For more information see [MongoDB Atlas for Government](https://www.mongodb.com/docs/atlas/government/api/#creating-a-project).
62+
* `is_slow_operation_thresholding_enabled` - (Optional) Flag that enables MongoDB Cloud to use its slow operation threshold for the specified project. The threshold determines which operations the Performance Advisor and Query Profiler considers slow. When enabled, MongoDB Cloud uses the average execution time for operations on your cluster to determine slow-running queries. As a result, the threshold is more pertinent to your cluster workload. The slow operation threshold is enabled by default for dedicated clusters (M10+). When disabled, MongoDB Cloud considers any operation that takes longer than 100 milliseconds to be slow. To use this resource, the requesting API Key must have the Project Owner role.
6163

6264
### Tags
6365

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ require (
1919
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
2020
github.com/hashicorp/terraform-plugin-testing v1.9.0
2121
github.com/mongodb-forks/digest v1.1.0
22+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20241018083659-a287665cc1d3
2223
github.com/spf13/cast v1.6.0
2324
github.com/stretchr/testify v1.9.0
2425
github.com/zclconf/go-cty v1.15.0
2526
go.mongodb.org/atlas v0.37.0
2627
go.mongodb.org/atlas-sdk/v20240530005 v20240530005.0.0
27-
go.mongodb.org/atlas-sdk/v20240805004 v20240805004.6.0
28+
go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.0
2829
go.mongodb.org/realm v0.1.0
2930
)
3031

go.sum

+4-2
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
635635
github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=
636636
github.com/mongodb-forks/digest v1.1.0 h1:7eUdsR1BtqLv0mdNm4OXs6ddWvR4X2/OsLwdKksrOoc=
637637
github.com/mongodb-forks/digest v1.1.0/go.mod h1:rb+EX8zotClD5Dj4NdgxnJXG9nwrlx3NWKJ8xttz1Dg=
638+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20241018083659-a287665cc1d3 h1:iK3OmXqUqkYsPCUwPlTXqylKTK7seP6U+I11OySwkcc=
639+
github.com/mongodb/atlas-sdk-go v1.0.1-0.20241018083659-a287665cc1d3/go.mod h1:CE0qO1AJFrP9ajK/KnRUwKzoPKVoqAmZVFnsofvTwRE=
638640
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
639641
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
640642
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
@@ -780,8 +782,8 @@ go.mongodb.org/atlas v0.37.0 h1:zQnO1o5+bVP9IotpAYpres4UjMD2F4nwNEFTZhNL4ck=
780782
go.mongodb.org/atlas v0.37.0/go.mod h1:DJYtM+vsEpPEMSkQzJnFHrT0sP7ev6cseZc/GGjJYG8=
781783
go.mongodb.org/atlas-sdk/v20240530005 v20240530005.0.0 h1:d/gbYJ+obR0EM/3DZf7+ZMi2QWISegm3mid7Or708cc=
782784
go.mongodb.org/atlas-sdk/v20240530005 v20240530005.0.0/go.mod h1:O47ZrMMfcWb31wznNIq2PQkkdoFoK0ea2GlmRqGJC2s=
783-
go.mongodb.org/atlas-sdk/v20240805004 v20240805004.6.0 h1:Ee5Med1KFGZ63KOvcDyn6xlKRP7+Yddt0kGI8M/CbWk=
784-
go.mongodb.org/atlas-sdk/v20240805004 v20240805004.6.0/go.mod h1:7KSDRNJm1Dxc+ggk2MOggp2/4zUpM4aRcP12evvsrQ4=
785+
go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.0 h1:EGTT54tKbDbkhhK+jH5AqINFQbHdvaOSpI0oeI5Tl1s=
786+
go.mongodb.org/atlas-sdk/v20240805005 v20240805005.0.0/go.mod h1:UTNpAyiKm/7utu+Nl0FafgjgvS+ONNGEoxBT5g/40WM=
785787
go.mongodb.org/realm v0.1.0 h1:zJiXyLaZrznQ+Pz947ziSrDKUep39DO4SfA0Fzx8M4M=
786788
go.mongodb.org/realm v0.1.0/go.mod h1:4Vj6iy+Puo1TDERcoh4XZ+pjtwbOzPpzqy3Cwe8ZmDM=
787789
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/v20240805004/admin"
6+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
77
)
88

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

internal/config/client.go

+26-9
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import (
99
"strings"
1010
"time"
1111

12+
adminpreview "github.com/mongodb/atlas-sdk-go/admin"
1213
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
13-
"go.mongodb.org/atlas-sdk/v20240805004/admin"
14+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
1415
matlasClient "go.mongodb.org/atlas/mongodbatlas"
1516
realmAuth "go.mongodb.org/realm/auth"
1617
"go.mongodb.org/realm/realm"
@@ -32,6 +33,7 @@ type MongoDBClient struct {
3233
Atlas *matlasClient.Client
3334
AtlasV2 *admin.APIClient
3435
AtlasV220240530 *admin20240530.APIClient // used in advanced_cluster and cloud_backup_schedule for avoiding breaking changes
36+
AtlasPreview *adminpreview.APIClient // used for preview features, don't use in resources exposed in the provider list
3537
Config *Config
3638
}
3739

@@ -110,13 +112,18 @@ func (c *Config) NewClient(ctx context.Context) (any, error) {
110112
return nil, err
111113
}
112114

115+
sdkPreviewClient, err := c.newSDKPreviewClient(client)
116+
if err != nil {
117+
return nil, err
118+
}
119+
113120
clients := &MongoDBClient{
114121
Atlas: atlasClient,
115122
AtlasV2: sdkV2Client,
116123
AtlasV220240530: sdkV220240530Client,
124+
AtlasPreview: sdkPreviewClient,
117125
Config: c,
118126
}
119-
120127
return clients, nil
121128
}
122129

@@ -127,13 +134,11 @@ func (c *Config) newSDKV2Client(client *http.Client) (*admin.APIClient, error) {
127134
admin.UseBaseURL(c.BaseURL),
128135
admin.UseDebug(false)}
129136

130-
// Initialize the MongoDB Versioned Atlas Client.
131-
sdkv2, err := admin.NewClient(opts...)
137+
sdk, err := admin.NewClient(opts...)
132138
if err != nil {
133139
return nil, err
134140
}
135-
136-
return sdkv2, nil
141+
return sdk, nil
137142
}
138143

139144
func (c *Config) newSDKV220240530Client(client *http.Client) (*admin20240530.APIClient, error) {
@@ -143,13 +148,25 @@ func (c *Config) newSDKV220240530Client(client *http.Client) (*admin20240530.API
143148
admin20240530.UseBaseURL(c.BaseURL),
144149
admin20240530.UseDebug(false)}
145150

146-
// Initialize the MongoDB Versioned Atlas Client.
147-
sdkv2, err := admin20240530.NewClient(opts...)
151+
sdk, err := admin20240530.NewClient(opts...)
148152
if err != nil {
149153
return nil, err
150154
}
155+
return sdk, nil
156+
}
157+
158+
func (c *Config) newSDKPreviewClient(client *http.Client) (*adminpreview.APIClient, error) {
159+
opts := []adminpreview.ClientModifier{
160+
adminpreview.UseHTTPClient(client),
161+
adminpreview.UseUserAgent(userAgent(c)),
162+
adminpreview.UseBaseURL(c.BaseURL),
163+
adminpreview.UseDebug(false)}
151164

152-
return sdkv2, nil
165+
sdk, err := adminpreview.NewClient(opts...)
166+
if err != nil {
167+
return nil, err
168+
}
169+
return sdk, nil
153170
}
154171

155172
func (c *MongoDBClient) GetRealmClient(ctx context.Context) (*realm.Client, error) {

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/v20240805004/admin"
13+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
1414
)
1515

1616
func PluralDataSource() *schema.Resource {

internal/service/accesslistapikey/resource_access_list_api_key.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
1414
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
1515
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
16-
"go.mongodb.org/atlas-sdk/v20240805004/admin"
16+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
1717
)
1818

1919
func Resource() *schema.Resource {

internal/service/advancedcluster/data_source_advanced_clusters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"net/http"
88

99
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
10-
"go.mongodb.org/atlas-sdk/v20240805004/admin"
10+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
1111

1212
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1313
"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
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313

1414
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
15-
"go.mongodb.org/atlas-sdk/v20240805004/admin"
15+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
1616

1717
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1818
"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
@@ -8,8 +8,8 @@ import (
88
"testing"
99

1010
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
11-
"go.mongodb.org/atlas-sdk/v20240805004/admin"
12-
"go.mongodb.org/atlas-sdk/v20240805004/mockadmin"
11+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
12+
"go.mongodb.org/atlas-sdk/v20240805005/mockadmin"
1313

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

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/v20240805004/admin"
5+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
66

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

internal/service/advancedcluster/resource_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/v20240805004/admin"
16+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
1717

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

0 commit comments

Comments
 (0)