You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add support for 'VolumeConfigurations' property on both UpdateService and RunTask API call (#721)
* Add Support for VolumeConfigurations for both UpdateService and RunTask api call
* Add service-managed-ebs-volume and run-task-managed-ebs-volume inputs to the action.yml file
* Update convertToManagedEbsVolumeObject syntax
* Include additional logs to debug error in Update Service
* changing convertToManagedEbsVolumeObject method to a snchronous function
* Correct variable name
* Removed debug log lines
* Correct variable name in Run Task
* Set VolumeConfigurations to be null by default
* Add a null check for the VolumeConfigurations property
* Update VolumeConfigurations to be a empty list instead of not passing it during subsequent Update Service Calls
* Update parameter descriptions for managed-ebs-volume
* Update README.md to contain information on how to configure Amazon EBS Volumes
* Add unit tests
* Update Readme
* Updating warning message to clarify that VolumeConfigurations property will be ignored if service or task managed-ebs-volume-name property is not provided
This action relies on the [default behavior of the AWS SDK for Javascript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) to determine AWS credentials and region.
Copy file name to clipboardExpand all lines: action.yml
+12
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,12 @@ inputs:
40
40
force-new-deployment:
41
41
description: 'Whether to force a new deployment of the service. Valid value is "true". Will default to not force a new deployment.'
42
42
required: false
43
+
service-managed-ebs-volume-name:
44
+
description: "The name of the volume, to be manage in the ECS service. This value must match the volume name from the Volume object in the task definition, that was configuredAtLaunch."
45
+
required: false
46
+
service-managed-ebs-volume:
47
+
description: "A JSON object defining the configuration settings for the EBS Service volume that was ConfiguredAtLaunch. You can configure size, volumeType, IOPS, throughput, snapshot and encryption in ServiceManagedEBSVolumeConfiguration. Currently, the only supported volume type is an Amazon EBS volume."
48
+
required: false
43
49
run-task:
44
50
description: 'A boolean indicating whether to run a stand-alone task in a ECS cluster. Task will run before the service is updated if both are provided. Default value is false .'
45
51
required: false
@@ -67,6 +73,12 @@ inputs:
67
73
run-task-tags:
68
74
description: 'A JSON array of tags.'
69
75
required: false
76
+
run-task-managed-ebs-volume-name:
77
+
description: "The name of the volume. This value must match the volume name from the Volume object in the task definition, that was configuredAtLaunch."
78
+
required: false
79
+
run-task-managed-ebs-volume:
80
+
description: "A JSON object defining the configuration settings for the Amazon EBS task volume that was configuredAtLaunch. These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. The Amazon EBS volumes are visible in your account in the Amazon EC2 console once they are created."
81
+
required: false
70
82
wait-for-task-stopped:
71
83
description: 'Whether to wait for the task to stop when running it outside of a service. Will default to not wait.'
core.warning(`run-task-managed-ebs-volume-name provided without run-task-managed-ebs-volume value. VolumeConfigurations property will not be included in the RunTask API call`);
core.warning('service-managed-ebs-volume-name provided without service-managed-ebs-volume value. VolumeConfigurations property will not be included in the UpdateService API call');
218
+
}
219
+
}
220
+
145
221
let params = {
146
222
cluster: clusterName,
147
223
service: service,
148
224
taskDefinition: taskDefArn,
149
225
forceNewDeployment: forceNewDeployment,
150
226
enableECSManagedTags: enableECSManagedTags,
151
-
propagateTags: propagateTags
227
+
propagateTags: propagateTags,
228
+
volumeConfigurations: volumeConfigurations
152
229
};
153
230
154
231
// Add the desiredCount property only if it is defined and a number.
core.warning(`run-task-managed-ebs-volume-name provided without run-task-managed-ebs-volume value. VolumeConfigurations property will not be included in the RunTask API call`);
core.warning('service-managed-ebs-volume-name provided without service-managed-ebs-volume value. VolumeConfigurations property will not be included in the UpdateService API call');
212
+
}
213
+
}
214
+
139
215
letparams={
140
216
cluster: clusterName,
141
217
service: service,
142
218
taskDefinition: taskDefArn,
143
219
forceNewDeployment: forceNewDeployment,
144
220
enableECSManagedTags: enableECSManagedTags,
145
-
propagateTags: propagateTags
221
+
propagateTags: propagateTags,
222
+
volumeConfigurations: volumeConfigurations
146
223
};
147
224
148
225
// Add the desiredCount property only if it is defined and a number.
0 commit comments