@@ -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