diff --git a/README.md b/README.md index f9f0126..95e6e95 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ You can override the generated CF resource properties per task with the `overrid ``` custom: fargate: + override: + cluster: + Foo: bar + tasks: my-task: image: 123456789369.dkr.ecr.eu-west-1.amazonaws.com/my-image diff --git a/lib/index.js b/lib/index.js index 09a7d38..3985250 100644 --- a/lib/index.js +++ b/lib/index.js @@ -22,9 +22,12 @@ class ServerlessFargateTasks { if (debug) consoleLog(yellow('Fargate Tasks Plugin')); + const clusterOverride = options.override && options.override.cluster || {}; + // add the cluster template['Resources']['FargateTasksCluster'] = { "Type" : "AWS::ECS::Cluster", + ...clusterOverride } // Create a loggroup for the logs