I am currently working with editing/modifying yml files. I am a bit new using yq and unsure if I am going overboard using the tool. I am trying to replace two values in the yaml file with two environment values(linux system) as shown below. I am getting an invalid key reference error just simply trying to read the fields of that field using yq. What will be the best approach for modifying the fields the yml file? Would it be better to use sed or awk?
Environment Variables
$APP_KEY="DSDedfwerer02"
$APP_NAME="Test1"
test.yml
common: &default_settings
app_key: ""
app_name: ""
some_key1: "test"
some_key2: "onetwo"
some_key3: "filename"
another_key_n: "somevalue"
Desired result: test.yml
common: &default_settings
app_key: "DSDedfwerer02"
app_name: "Test1"