Skip to content

Commit 8e104e4

Browse files
committed
no need to pass param nAdvConf as this func is only used for advanced_configuration
1 parent 0273b9a commit 8e104e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/convert/adv2v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func updateResource(resource *hclwrite.Block) (bool, error) {
5050
if err := fillTagsLabelsOpt(resourceb, nLabels); err != nil {
5151
return false, err
5252
}
53-
fillAdvConfigOpt(resourceb, nAdvConf)
53+
fillAdvConfigOpt(resourceb)
5454
fillBlockOpt(resourceb, nBiConnector)
5555
fillBlockOpt(resourceb, nPinnedFCV)
5656
fillBlockOpt(resourceb, nTimeouts)

internal/convert/clu2adv.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func fillCluster(resourceb *hclwrite.Body) error {
164164
if err := fillTagsLabelsOpt(resourceb, nLabels); err != nil {
165165
return err
166166
}
167-
fillAdvConfigOpt(resourceb, nAdvConf)
167+
fillAdvConfigOpt(resourceb)
168168
fillBlockOpt(resourceb, nBiConnector)
169169
fillBlockOpt(resourceb, nPinnedFCV)
170170
fillBlockOpt(resourceb, nTimeouts)
@@ -303,8 +303,8 @@ func fillBlockOpt(resourceb *hclwrite.Body, name string) {
303303
resourceb.SetAttributeRaw(name, hcl.TokensObject(block.Body()))
304304
}
305305

306-
func fillAdvConfigOpt(resourceb *hclwrite.Body, name string) {
307-
block := resourceb.FirstMatchingBlock(name, nil)
306+
func fillAdvConfigOpt(resourceb *hclwrite.Body) {
307+
block := resourceb.FirstMatchingBlock(nAdvConf, nil)
308308
if block == nil {
309309
return
310310
}
@@ -314,7 +314,7 @@ func fillAdvConfigOpt(resourceb *hclwrite.Body, name string) {
314314
blockBody.RemoveAttribute(nFailIndexKeyTooLong)
315315
blockBody.RemoveAttribute(nDefaultReadConcern)
316316

317-
fillBlockOpt(resourceb, name)
317+
fillBlockOpt(resourceb, nAdvConf)
318318
}
319319

320320
// fillReplicationSpecsWithDynamicBlock used for dynamic blocks in replication_specs

0 commit comments

Comments
 (0)