Skip to content

Commit

Permalink
don't include accept_data_risks_and_force_replica_set_reconfig in ds
Browse files Browse the repository at this point in the history
  • Loading branch information
lantoli committed Dec 15, 2024
1 parent 52db864 commit 6937e40
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 32 deletions.
1 change: 1 addition & 0 deletions internal/service/advancedclustertpf/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func (d *ds) Schema(ctx context.Context, req datasource.SchemaRequest, resp *dat
Optional: true,
MarkdownDescription: "use_replication_spec_per_shard", // TODO: add documentation
},
"accept_data_risks_and_force_replica_set_reconfig": nil,
},
})
}
Expand Down
1 change: 1 addition & 0 deletions internal/service/advancedclustertpf/plural_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (d *pluralDS) Schema(ctx context.Context, req datasource.SchemaRequest, res
Optional: true,
MarkdownDescription: "use_replication_spec_per_shard", // TODO: add documentation
},
"accept_data_risks_and_force_replica_set_reconfig": nil,
},
})
}
Expand Down
63 changes: 31 additions & 32 deletions internal/service/advancedclustertpf/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,39 +537,38 @@ type TFModel struct {
PitEnabled types.Bool `tfsdk:"pit_enabled"`
}

// TFModelDS differs from TFModel: misses timeouts, adds use_replication_spec_per_shard.
// TFModelDS differs from TFModel: removes timeouts, accept_data_risks_and_force_replica_set_reconfig; adds use_replication_spec_per_shard.
type TFModelDS struct {
DiskSizeGB types.Float64 `tfsdk:"disk_size_gb"`
Labels types.Set `tfsdk:"labels"`
ReplicationSpecs types.List `tfsdk:"replication_specs"`
Tags types.Set `tfsdk:"tags"`
ReplicaSetScalingStrategy types.String `tfsdk:"replica_set_scaling_strategy"`
Name types.String `tfsdk:"name"`
AdvancedConfiguration types.Object `tfsdk:"advanced_configuration"`
BiConnectorConfig types.Object `tfsdk:"bi_connector_config"`
RootCertType types.String `tfsdk:"root_cert_type"`
ClusterType types.String `tfsdk:"cluster_type"`
MongoDBMajorVersion types.String `tfsdk:"mongo_db_major_version"`
ConfigServerType types.String `tfsdk:"config_server_type"`
VersionReleaseSystem types.String `tfsdk:"version_release_system"`
ConnectionStrings types.Object `tfsdk:"connection_strings"`
StateName types.String `tfsdk:"state_name"`
MongoDBVersion types.String `tfsdk:"mongo_db_version"`
CreateDate types.String `tfsdk:"create_date"`
AcceptDataRisksAndForceReplicaSetReconfig types.String `tfsdk:"accept_data_risks_and_force_replica_set_reconfig"`
EncryptionAtRestProvider types.String `tfsdk:"encryption_at_rest_provider"`
ProjectID types.String `tfsdk:"project_id"`
ClusterID types.String `tfsdk:"cluster_id"`
ConfigServerManagementMode types.String `tfsdk:"config_server_management_mode"`
PinnedFCV types.Object `tfsdk:"pinned_fcv"`
UseReplicationSpecPerShard types.Bool `tfsdk:"use_replication_spec_per_shard"`
RedactClientLogData types.Bool `tfsdk:"redact_client_log_data"`
GlobalClusterSelfManagedSharding types.Bool `tfsdk:"global_cluster_self_managed_sharding"`
BackupEnabled types.Bool `tfsdk:"backup_enabled"`
RetainBackupsEnabled types.Bool `tfsdk:"retain_backups_enabled"`
Paused types.Bool `tfsdk:"paused"`
TerminationProtectionEnabled types.Bool `tfsdk:"termination_protection_enabled"`
PitEnabled types.Bool `tfsdk:"pit_enabled"`
DiskSizeGB types.Float64 `tfsdk:"disk_size_gb"`
Labels types.Set `tfsdk:"labels"`
ReplicationSpecs types.List `tfsdk:"replication_specs"`
Tags types.Set `tfsdk:"tags"`
ReplicaSetScalingStrategy types.String `tfsdk:"replica_set_scaling_strategy"`
Name types.String `tfsdk:"name"`
AdvancedConfiguration types.Object `tfsdk:"advanced_configuration"`
BiConnectorConfig types.Object `tfsdk:"bi_connector_config"`
RootCertType types.String `tfsdk:"root_cert_type"`
ClusterType types.String `tfsdk:"cluster_type"`
MongoDBMajorVersion types.String `tfsdk:"mongo_db_major_version"`
ConfigServerType types.String `tfsdk:"config_server_type"`
VersionReleaseSystem types.String `tfsdk:"version_release_system"`
ConnectionStrings types.Object `tfsdk:"connection_strings"`
StateName types.String `tfsdk:"state_name"`
MongoDBVersion types.String `tfsdk:"mongo_db_version"`
CreateDate types.String `tfsdk:"create_date"`
EncryptionAtRestProvider types.String `tfsdk:"encryption_at_rest_provider"`
ProjectID types.String `tfsdk:"project_id"`
ClusterID types.String `tfsdk:"cluster_id"`
ConfigServerManagementMode types.String `tfsdk:"config_server_management_mode"`
PinnedFCV types.Object `tfsdk:"pinned_fcv"`
UseReplicationSpecPerShard types.Bool `tfsdk:"use_replication_spec_per_shard"`
RedactClientLogData types.Bool `tfsdk:"redact_client_log_data"`
GlobalClusterSelfManagedSharding types.Bool `tfsdk:"global_cluster_self_managed_sharding"`
BackupEnabled types.Bool `tfsdk:"backup_enabled"`
RetainBackupsEnabled types.Bool `tfsdk:"retain_backups_enabled"`
Paused types.Bool `tfsdk:"paused"`
TerminationProtectionEnabled types.Bool `tfsdk:"termination_protection_enabled"`
PitEnabled types.Bool `tfsdk:"pit_enabled"`
}

type TFBiConnectorModel struct {
Expand Down

0 comments on commit 6937e40

Please sign in to comment.