refactor: rename variable for clarity

pull/390/head
Michael Smith 3 months ago
parent 6733ae50d5
commit 0a4a62db51

@ -198,13 +198,13 @@ export const runTerraformApply = async <TVars extends TerraformVariables>(
): Promise<TerraformState> => {
const stateFile = `${dir}/${crypto.randomUUID()}.tfstate`;
const combinedEnv: Record<string, string | undefined> = {
const childEnv: Record<string, string | undefined> = {
...process.env,
...(customEnv ?? {}),
};
for (const [key, value] of Object.entries(vars) as [string, JsonValue][]) {
if (value !== null) {
combinedEnv[`TF_VAR_${key}`] = String(value);
childEnv[`TF_VAR_${key}`] = String(value);
}
}
@ -221,7 +221,7 @@ export const runTerraformApply = async <TVars extends TerraformVariables>(
],
{
cwd: dir,
env: combinedEnv,
env: childEnv,
stderr: "pipe",
stdout: "pipe",
},

Loading…
Cancel
Save