I have a file with below content,
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::1234566:role/radeks-project-us-east-1-NodeInstanceRole
username: system:node:{{EC2PrivateDNSName}}
I want to append this file content as shown below with eks ,iammappings as first two lines,
eks:
iammappings:
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::1234566:role/radeks-project-us-east-1-NodeInstanceRole
username: system:node:{{EC2PrivateDNSName}}
I tried yq merge.But It didnt work for me.Please let me know how to do this.
groupsis the key in a dictionary whose value isnull, andsystem:bootstrappersandsystem:nodesare not insidegroups, but instead are separate items in theiammappingslist.