# fargateDeploy

Deploy a AWS ECS-based Fargate service. It is presently a wrapper around a [python deployment script.](https://github.com/theorchard/python-deployment-utils/blob/master/fargate/deploy.py)

## Parameters

| Name                   | Description                                                                                                                                                                               | Type           | Default                           | Required |
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|-----------------------------------|----------|
| awsRegions             | A list of AWS regions containing Fargate services                                                                                                                                         | `List<String>` | n/a                               | yes      |
| clusterName            | Name of cluster, if it differs from convention                                                                                                                                            | `string`       | `"${environment}-${serviceName}"` | no       |
| containerName          | Name of container, if it differs from service name                                                                                                                                        | `string`       | `$serviceName`                    | no       |
| customSidecars         | A list of custom sidecar containers                                                                                                                                                       | `List<String>` | n/a                               | no       |
| deployMode             | Deployment mode: should be one of `NEW_DEPLOYMENT`, `REDEPLOY`, or `REVERT`                                                                                                               | `string`       | n/a                               | no       |
| deployType             | Deployment type: should be one of `UPDATE_SERVICE`, `UPDATE_CLOUDWATCH_EVENT`, or `CREATE_TASK_DEFINITION`                                                                                | `string`       | `UPDATE_SERVICE`                  |
| doUpdateCustomSidecars | Indicate whether to update custom sidecars in Fargate task definition                                                                                                                     | `boolean`      | `false`                           | no       |
| ecrRegistryAccountId   | AWS account ID containing ECR repository                                                                                                                                                  | `string`       | n/a                               | no       |
| ecrRegistryRegion      | AWS region for ECR repository                                                                                                                                                             | `string`       | n/a                               | no       |
| environment            | Name of environment, e.g. dev, qa, prod                                                                                                                                                   | `string`       | n/a                               | yes      |
| gitCommit              | Git commit hash                                                                                                                                                                           | `string`       | n/a                               | yes      |
| fargateServiceName     | Name of Fargate service, if it differs from convention                                                                                                                                    | `string`       | `"${environment}-${serviceName}"` | no       |
| forceScaleOut          | By default, if the service currently has a desired task count of 0, the deployment will fail. Set this to automatically scale out to 1 task for the deployment, e.g. for worker services. | `boolean`      | `false`                           | no       |
| imageNameOverride      | Name of ECR repository and image                                                                                                                                                          | `string`       | n/a                               | no       |
| imageUri               | Name of image URI                                                                                                                                                                         | `string`       | n/a                               | no       |
| serviceName            | Name of service                                                                                                                                                                           | `string`       | n/a                               | yes      |
| taskFamily             | Name of task family, if it differs from convention                                                                                                                                        | `string`       | `"${environment}-${serviceName}"` | no       |
| updateTimeout          | Update timeout in seconds                                                                                                                                                                 | `string`       | n/a                               | no       |
| verifyMode             | The mode to use to verify the deployment. Should be one of `HEALTH_CHECK`, `EXIT_CODE`, `TASK_RUNNING`, or `OFF`                                                                          | `string`       | n/a                               | no       |
| dockerImage            | Docker image to run the deployment script from. The full image URI is resolved from the default registry unless overridden.                                                               | `string`       | `fargate-tools:latest`            | no       |
