Skip to content

Commit ab4c407

Browse files
Don't escape propertyValue as it breaks the syntax
1 parent d5eb24a commit ab4c407

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/blocks/terraform/src/lib/hcledit-cli.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ export async function updateResourceProperties(
111111
for (const modification of modifications) {
112112
const propertyName = modification.propertyName;
113113
const propertyValue = sanitizePropertyValue(modification.propertyValue);
114-
const safePropertyValue = escapeShellArgument(propertyValue);
115114

116115
const attributeCommand = await getAttributeCommand(
117116
filePath,
@@ -121,7 +120,7 @@ export async function updateResourceProperties(
121120
);
122121

123122
updates.push(
124-
`attribute ${attributeCommand} resource.${resourceType}.${resourceName}.${propertyName} ${safePropertyValue}`,
123+
`attribute ${attributeCommand} resource.${resourceType}.${resourceName}.${propertyName} ${propertyValue}`,
125124
);
126125
}
127126

@@ -181,7 +180,7 @@ export async function deleteResource(
181180
commandResult.exitCode !== 0 ||
182181
commandResult.stdError
183182
) {
184-
logger.warn('Failed to modify the template.', { commandResult });
183+
logger.warn('Failed to delete resource from template', { commandResult });
185184
throw new Error(
186185
`Failed to modify the template. ${JSON.stringify(commandResult)}`,
187186
);

0 commit comments

Comments
 (0)