Your glob is never expanded: unquoted parameter expansions inside [[ ... ]] do not undergo pathname expansions. Your loop is also incorrect: for f in ./ iterates exactly once, setting f to the string ./, rather than iteration over the files in the current directly. And finally, if there are more than one matching file, you'll repeatedly overwrite the previous contents of output.txt; use >> instead.
You could try
valuesfile="values.*"
for f in ./$valuesfile
do
yq d "$f" 'resources.' >> ./output.txt
done
though this will cause problems if any of your files have whitespace, as the expansion of $valuesfile undergoes word-splitting as well as pathname expansion.
Use an array instead:
valuesfile=( values.* )
for f in "${valuesfile[@]}"
do
yq d "$f" 'resources.' >> output.txt
done
Or, just dispense with the extra variable and put the pattern in the loop directly:
for f in values.*
do
yq d "$f" 'resources.' >> output.txt
done
yqbut thedlooks strange. Usually one would expect an option to be proceeded by at least 1-ifwill never execute.lshere.