Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mongodb_user): Fix MongoDb users import and minor errors #485

Merged
merged 8 commits into from
Jan 7, 2025
Prev Previous commit
chore: Delete logs that print password
youngmn committed Jan 7, 2025
commit c8a90724e3f4c34871b2fc2b3d6403a5f2a2d6e4
4 changes: 0 additions & 4 deletions internal/service/mongodb/mongodb_users.go
Original file line number Diff line number Diff line change
@@ -152,8 +152,6 @@ func (r *mongodbUsersResource) Create(ctx context.Context, req resource.CreateRe
CloudMongoDbUserList: convertToAddOrChangeParameters(plan.MongoDbUserSet),
}

tflog.Info(ctx, "CreateMongodbUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vmongodb.V2Api.AddCloudMongoDbUserList(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
@@ -437,7 +435,6 @@ func addOrChangeUserList(ctx context.Context, config *conn.ProviderConfig, id *s
CloudMongoDbInstanceNo: id,
CloudMongoDbUserList: changeParameters,
}
tflog.Info(ctx, "ChangeCloudMongoDbUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := config.Client.Vmongodb.V2Api.ChangeCloudMongoDbUserList(reqParams)
if err != nil {
@@ -461,7 +458,6 @@ func addOrChangeUserList(ctx context.Context, config *conn.ProviderConfig, id *s
CloudMongoDbInstanceNo: id,
CloudMongoDbUserList: addParameters,
}
tflog.Info(ctx, "AddCloudMongoDbUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := config.Client.Vmongodb.V2Api.AddCloudMongoDbUserList(reqParams)
if err != nil {