@@ -28,31 +28,31 @@ func newTFModel(ctx context.Context, input *admin.ClusterDescription20240805, di
2828 return & TFModel {
2929 AcceptDataRisksAndForceReplicaSetReconfig : types .StringPointerValue (conversion .TimePtrToStringPtr (input .AcceptDataRisksAndForceReplicaSetReconfig )),
3030 AdvancedConfiguration : types .ObjectNull (advancedConfigurationObjType .AttrTypes ),
31- BackupEnabled : types .BoolValue ( conversion . SafeValue ( input .BackupEnabled ) ),
31+ BackupEnabled : types .BoolPointerValue ( input .BackupEnabled ),
3232 BiConnectorConfig : biConnector ,
33- ClusterType : types .StringValue ( conversion . SafeValue ( input .ClusterType ) ),
34- ConfigServerManagementMode : types .StringValue ( conversion . SafeValue ( input .ConfigServerManagementMode ) ),
33+ ClusterType : types .StringPointerValue ( input .ClusterType ),
34+ ConfigServerManagementMode : types .StringPointerValue ( input .ConfigServerManagementMode ),
3535 ConfigServerType : types .StringValue (conversion .SafeValue (input .ConfigServerType )),
3636 ConnectionStrings : connectionStrings ,
3737 CreateDate : types .StringValue (conversion .SafeValue (conversion .TimePtrToStringPtr (input .CreateDate ))),
38- EncryptionAtRestProvider : types .StringValue ( conversion . SafeValue ( input .EncryptionAtRestProvider ) ),
39- GlobalClusterSelfManagedSharding : types .BoolValue ( conversion . SafeValue ( input .GlobalClusterSelfManagedSharding ) ),
38+ EncryptionAtRestProvider : types .StringPointerValue ( input .EncryptionAtRestProvider ),
39+ GlobalClusterSelfManagedSharding : types .BoolPointerValue ( input .GlobalClusterSelfManagedSharding ),
4040 ProjectID : types .StringValue (conversion .SafeValue (input .GroupId )),
4141 ClusterID : types .StringValue (conversion .SafeValue (input .Id )),
4242 Labels : labels ,
43- MongoDBMajorVersion : types .StringValue ( conversion . SafeValue ( input .MongoDBMajorVersion ) ),
43+ MongoDBMajorVersion : types .StringPointerValue ( input .MongoDBMajorVersion ),
4444 MongoDBVersion : types .StringValue (conversion .SafeValue (input .MongoDBVersion )),
45- Name : types .StringValue ( conversion . SafeValue ( input .Name ) ),
46- Paused : types .BoolValue ( conversion . SafeValue ( input .Paused ) ),
47- PitEnabled : types .BoolValue ( conversion . SafeValue ( input .PitEnabled ) ),
48- RedactClientLogData : types .BoolValue ( conversion . SafeValue ( input .RedactClientLogData ) ),
49- ReplicaSetScalingStrategy : types .StringValue ( conversion . SafeValue ( input .ReplicaSetScalingStrategy ) ),
45+ Name : types .StringPointerValue ( input .Name ),
46+ Paused : types .BoolPointerValue ( input .Paused ),
47+ PitEnabled : types .BoolPointerValue ( input .PitEnabled ),
48+ RedactClientLogData : types .BoolPointerValue ( input .RedactClientLogData ),
49+ ReplicaSetScalingStrategy : types .StringPointerValue ( input .ReplicaSetScalingStrategy ),
5050 ReplicationSpecs : replicationSpecs ,
5151 RootCertType : types .StringValue (conversion .SafeValue (input .RootCertType )),
5252 StateName : types .StringValue (conversion .SafeValue (input .StateName )),
5353 Tags : tags ,
54- TerminationProtectionEnabled : types .BoolValue ( conversion . SafeValue ( input .TerminationProtectionEnabled ) ),
55- VersionReleaseSystem : types .StringValue ( conversion . SafeValue ( input .VersionReleaseSystem ) ),
54+ TerminationProtectionEnabled : types .BoolPointerValue ( input .TerminationProtectionEnabled ),
55+ VersionReleaseSystem : types .StringPointerValue ( input .VersionReleaseSystem ),
5656 PinnedFCV : pinnedFCV ,
5757 }
5858}
@@ -69,32 +69,32 @@ func newTFModelDS(ctx context.Context, input *admin.ClusterDescription20240805,
6969 return nil
7070 }
7171 return & TFModelDS {
72- BackupEnabled : types .BoolValue ( conversion . SafeValue ( input .BackupEnabled ) ),
72+ BackupEnabled : types .BoolPointerValue ( input .BackupEnabled ),
7373 BiConnectorConfig : biConnector ,
74- ClusterType : types .StringValue ( conversion . SafeValue ( input .ClusterType ) ),
75- ConfigServerManagementMode : types .StringValue ( conversion . SafeValue ( input .ConfigServerManagementMode ) ),
74+ ClusterType : types .StringPointerValue ( input .ClusterType ),
75+ ConfigServerManagementMode : types .StringPointerValue ( input .ConfigServerManagementMode ),
7676 ConfigServerType : types .StringValue (conversion .SafeValue (input .ConfigServerType )),
7777 ConnectionStrings : connectionStrings ,
7878 CreateDate : types .StringValue (conversion .SafeValue (conversion .TimePtrToStringPtr (input .CreateDate ))),
79- EncryptionAtRestProvider : types .StringValue ( conversion . SafeValue ( input .EncryptionAtRestProvider ) ),
80- GlobalClusterSelfManagedSharding : types .BoolValue ( conversion . SafeValue ( input .GlobalClusterSelfManagedSharding ) ),
79+ EncryptionAtRestProvider : types .StringPointerValue ( input .EncryptionAtRestProvider ),
80+ GlobalClusterSelfManagedSharding : types .BoolPointerValue ( input .GlobalClusterSelfManagedSharding ),
8181 ProjectID : types .StringValue (conversion .SafeValue (input .GroupId )),
8282 ClusterID : types .StringValue (conversion .SafeValue (input .Id )),
8383 Labels : labels ,
84- MongoDBMajorVersion : types .StringValue ( conversion . SafeValue ( input .MongoDBMajorVersion ) ),
84+ MongoDBMajorVersion : types .StringPointerValue ( input .MongoDBMajorVersion ),
8585 MongoDBVersion : types .StringValue (conversion .SafeValue (input .MongoDBVersion )),
86- Name : types .StringValue ( conversion . SafeValue ( input .Name ) ),
87- Paused : types .BoolValue ( conversion . SafeValue ( input .Paused ) ),
88- PitEnabled : types .BoolValue ( conversion . SafeValue ( input .PitEnabled ) ),
89- RedactClientLogData : types .BoolValue ( conversion . SafeValue ( input .RedactClientLogData ) ),
90- ReplicaSetScalingStrategy : types .StringValue ( conversion . SafeValue ( input .ReplicaSetScalingStrategy ) ),
86+ Name : types .StringPointerValue ( input .Name ),
87+ Paused : types .BoolPointerValue ( input .Paused ),
88+ PitEnabled : types .BoolPointerValue ( input .PitEnabled ),
89+ RedactClientLogData : types .BoolPointerValue ( input .RedactClientLogData ),
90+ ReplicaSetScalingStrategy : types .StringPointerValue ( input .ReplicaSetScalingStrategy ),
9191 ReplicationSpecs : replicationSpecs ,
9292 EffectiveReplicationSpecs : effectiveReplicationSpecs ,
9393 RootCertType : types .StringValue (conversion .SafeValue (input .RootCertType )),
9494 StateName : types .StringValue (conversion .SafeValue (input .StateName )),
9595 Tags : tags ,
96- TerminationProtectionEnabled : types .BoolValue ( conversion . SafeValue ( input .TerminationProtectionEnabled ) ),
97- VersionReleaseSystem : types .StringValue ( conversion . SafeValue ( input .VersionReleaseSystem ) ),
96+ TerminationProtectionEnabled : types .BoolPointerValue ( input .TerminationProtectionEnabled ),
97+ VersionReleaseSystem : types .StringPointerValue ( input .VersionReleaseSystem ),
9898 PinnedFCV : pinnedFCV ,
9999 }
100100}
@@ -104,8 +104,8 @@ func newBiConnectorConfigObjType(ctx context.Context, input *admin.BiConnector,
104104 return types .ObjectNull (biConnectorConfigObjType .AttrTypes )
105105 }
106106 tfModel := TFBiConnectorModel {
107- Enabled : types .BoolValue ( conversion . SafeValue ( input .Enabled ) ),
108- ReadPreference : types .StringValue ( conversion . SafeValue ( input .ReadPreference ) ),
107+ Enabled : types .BoolPointerValue ( input .Enabled ),
108+ ReadPreference : types .StringPointerValue ( input .ReadPreference ),
109109 }
110110 objType , diagsLocal := types .ObjectValueFrom (ctx , biConnectorConfigObjType .AttrTypes , tfModel )
111111 diags .Append (diagsLocal ... )
@@ -210,7 +210,7 @@ func convertReplicationSpecs(ctx context.Context, input *[]admin.ReplicationSpec
210210 }
211211 tfModels [i ] = TFReplicationSpecsModel {
212212 RegionConfigs : regionConfigs ,
213- ZoneName : types .StringValue ( conversion . SafeValue ( item .ZoneName ) ),
213+ ZoneName : types .StringPointerValue ( item .ZoneName ),
214214 }
215215 }
216216 return & tfModels
@@ -296,9 +296,9 @@ func newRegionConfigModel(ctx context.Context, item *admin.CloudRegionConfig2024
296296 BackingProviderName : types .StringPointerValue (item .BackingProviderName ),
297297 ElectableSpecs : newSpecsFromHwObjType (ctx , item .ElectableSpecs , diags ),
298298 Priority : types .Int64PointerValue (conversion .IntPtrToInt64Ptr (item .Priority )),
299- ProviderName : types .StringValue ( conversion . SafeValue ( item .ProviderName ) ),
299+ ProviderName : types .StringPointerValue ( item .ProviderName ),
300300 ReadOnlySpecs : newSpecsObjType (ctx , item .ReadOnlySpecs , diags ),
301- RegionName : types .StringValue ( conversion . SafeValue ( item .RegionName ) ),
301+ RegionName : types .StringPointerValue ( item .RegionName ),
302302 }
303303}
304304
@@ -387,14 +387,14 @@ func newAutoScalingObjType(ctx context.Context, input *admin.AdvancedAutoScaling
387387 compute := input .Compute
388388 tfModel := TFAutoScalingModel {}
389389 if compute != nil {
390- tfModel .ComputeMaxInstanceSize = types .StringValue ( conversion . SafeValue ( compute .MaxInstanceSize ) )
391- tfModel .ComputeMinInstanceSize = types .StringValue ( conversion . SafeValue ( compute .MinInstanceSize ) )
392- tfModel .ComputeEnabled = types .BoolValue ( conversion . SafeValue ( compute .Enabled ) )
393- tfModel .ComputeScaleDownEnabled = types .BoolValue ( conversion . SafeValue ( compute .ScaleDownEnabled ) )
390+ tfModel .ComputeMaxInstanceSize = types .StringPointerValue ( compute .MaxInstanceSize )
391+ tfModel .ComputeMinInstanceSize = types .StringPointerValue ( compute .MinInstanceSize )
392+ tfModel .ComputeEnabled = types .BoolPointerValue ( compute .Enabled )
393+ tfModel .ComputeScaleDownEnabled = types .BoolPointerValue ( compute .ScaleDownEnabled )
394394 }
395395 diskGB := input .DiskGB
396396 if diskGB != nil {
397- tfModel .DiskGBEnabled = types .BoolValue ( conversion . SafeValue ( diskGB .Enabled ) )
397+ tfModel .DiskGBEnabled = types .BoolPointerValue ( diskGB .Enabled )
398398 }
399399 objType , diagsLocal := types .ObjectValueFrom (ctx , autoScalingObjType .AttrTypes , tfModel )
400400 diags .Append (diagsLocal ... )
0 commit comments