Context variables don't work

Hi.
I want to create some file, when VMs deploy from template.
I added to context-start script next lines:

cat <<EOF >> /etc/test.conf 
$NETWORK_ID
Public=$ETH0_IP
Private=$ETH1_IP
EOF

But the file is created without values.
How can i fix it?