create-envfile
create-envfile copied to clipboard
Sorted keys breaks variable dependence in the envfile
I've observed that the keys on the generated env file are sorted. However it breaks some variables that uses other variables in the env file. For instance: suppose a variable name DOMAIN_NAME=example.com envkey_DOMAIN_NAME: 'example.com' followed by another one such as BAR_HOST_FQDN=bar.${DOMAIN_NAME}. envkey_BAR_HOST_FQDN: "bar.${DOMAIN_NAME}"
the original env file is created such as DOMAIN_NAME=example.com BAR_HOST_FQDN=bar.${DOMAIN_NAME}
But the resulting translated env file is: BAR_HOST_FQDN=bar.${DOMAIN_NAME} DOMAIN_NAME=example.com
However, DOMAIN_NAME is not defined by the time BAR_HOST_FQDN is evaluated resulting in: BAR_HOST_FQDN: bar DOMAIN_NAME: example.com
which is different from the produced in the original env file: BAR_HOST_FQDN: bar.example.com DOMAIN_NAME: example.com
This doesn't seem to be much but it broke several large env files I have.