I want to automate the running of a cluster and can use tags to get attributes of an EC2 instance like its instance-id.
The documentation on https://docs.aws.amazon.
Below can be used to directly get instance Id
aws emr list-instances --cluster-id ${aws_emr_cluster.cluster.id} --instance- group-id ${aws_emr_cluster.cluster.master_instance_group.0.id} --query 'Instances[*].Ec2InstanceId' --output text