How to access CloudControl config.free CONFIG_VARS?
As it is not documented well here comes the answer:
if ($credFile = getenv('CRED_FILE')) { $credFileContents = file_get_contents($credFile); if ($credFileContents !== false) { $credData = json_decode($credFileContents, true); $value = $credData['CONFIG']['CONFIG_VARS']['MY_VAR']; } }
That means within CRED_FILE the config addon has its corresponding array/secction CONFIG which contains another array/section CONFIG_VARS which then contains your vars.
CRED_FILE
CONFIG
CONFIG_VARS
Copyright © 2021 Jogjafile Inc.
As it is not documented well here comes the answer:
That means within
CRED_FILE
the config addon has its corresponding array/secctionCONFIG
which contains another array/sectionCONFIG_VARS
which then contains your vars.