@@ -210,29 +210,28 @@ async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForSe
210
210
211
211
core.debug('Updating the service contd..');
212
212
213
- let volumeConfigurations = []
214
- let volumeConfigurationJSON = {}
213
+ let volumeConfigurations;
215
214
let serviceManagedEbsVolumeObject;
216
215
217
216
if (serviceManagedEbsVolumeName != '') {
218
217
core.debug(`Assigning VolumeConfiguration Name: ${serviceManagedEbsVolumeName}`);
219
218
core.debug('Assigning VolumeConfiguration.');
220
219
if (serviceManagedEbsVolume != '{}') {
221
220
serviceManagedEbsVolumeObject = convertToManagedEbsVolumeObject(serviceManagedEbsVolume);
222
- volumeConfigurationJSON["name"] = serviceManagedEbsVolumeName;
223
- volumeConfigurationJSON["managedEBSVolume"] = serviceManagedEbsVolumeObject;
224
- volumeConfigurations.push(volumeConfigurationJSON);
221
+ volumeConfigurations = [{
222
+ name: serviceManagedEbsVolumeName,
223
+ managedEBSVolume: serviceManagedEbsVolumeObject // Note the exact casing here
224
+ }];
225
225
core.debug('Assigning VolumeConfiguration Object');
226
226
} else {
227
227
core.warning('service-managed-ebs-volume-name provided without service-managed-ebs-volume value. Ignoring service-managed-ebs-volume property');
228
228
}
229
229
} else {
230
230
core.debug('No VolumeConfiguration Property provided for service-managed-ebs-volume');
231
231
}
232
- core.debug(' VolumeConfiguration Value: ${volumeConfiguration}' );
232
+ core.debug(` VolumeConfiguration Value: ${volumeConfigurations}` );
233
233
core.debug('VolumeConfiguration Value Set.');
234
234
235
-
236
235
let params = {
237
236
cluster: clusterName,
238
237
service: service,
@@ -243,6 +242,10 @@ async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForSe
243
242
volumeConfigurations: volumeConfigurations
244
243
};
245
244
245
+ core.debug(`Volume Configurations: ${JSON.stringify(volumeConfigurations, null, 2)}`);
246
+ core.debug(`Managed EBS Volume Object: ${JSON.stringify(serviceManagedEbsVolumeObject, null, 2)}`);
247
+ core.debug(`Final params: ${JSON.stringify(params, null, 2)}`);
248
+
246
249
// Add the desiredCount property only if it is defined and a number.
247
250
if (!isNaN(desiredCount) && desiredCount !== undefined) {
248
251
params.desiredCount = desiredCount;
0 commit comments