EMR reconfiguration for master and core instance group

Hi,
I want to know how to customize emr reconfiguation for instance group level for master and node, not for cluster level while spin up new cluster from terraform 12. is there a way ?

Since cluster configuration is by default inherited by master and core instance group. We have to do manual update for both from aws console.

Approach tried :

  1. Start the cluster with 1 master node and create the core node from aws_emr_instance_group and add there cored node instance to cluster.

Error: ValidationException: Cannot add instance groups to a master only job flow.
status code: 400, request id: 96c20b59-1886-4da8-bab5-bee28c22d1f2