Skip to content

Commit a81e441

Browse files
committed
HCK-4224: remove unnecessary ttl param when it is not defined or is set to 'Off'
1 parent 094e49a commit a81e441

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

forward_engineering/applyToInstance/applyToInstanceHelper.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ const applyToInstanceHelper = (_) => ({
6565
case TTL_ON:
6666
return _.parseInt(containerData.TTLseconds) || -1;
6767
case TTL_OFF:
68-
return ''
6968
default:
70-
return -1;
69+
return 0;
7170
}
7271
},
7372

forward_engineering/helpers/azureCLIScriptHelpers/buildAzureCLIScript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const getAzureCliContainerCreateStatement =
6464
JSON.stringify(getIndexPolicyScript(_)(containerData)),
6565
)}`;
6666
const uniqueKeysPolicyParam = getUniqueKeysPolicyParam(containerData[0], escapeAndWrapInQuotes);
67-
const ttlParam = `--ttl ${helper.getTTL(containerData[0])}`;
67+
const ttl = helper.getTTL(containerData[0]);
68+
const ttlParam = ttl !== 0 ? `--ttl ${helper.getTTL(containerData[0])}` : '';
6869

6970
const cliStatement = `${CLI} ${CONTAINER} ${CREATE}`;
7071
const requiredParams = [

0 commit comments

Comments
 (0)