dawson-org / dawson-cli

A serverless web framework for Node.js on AWS (CloudFormation, CloudFront, API Gateway, Lambda)
https://dawson.sh
GNU General Public License v3.0
712 stars 25 forks source link

Optional SSL/TLS certificate #70

Closed lcasartelli closed 7 years ago

lcasartelli commented 7 years ago

We may add an additional field into package.json to make certificate creation an optional feature.

lusentis commented 7 years ago

we should add a --skip-acm to skip SSL/TLS and to not set ViewerCertificate property on CloudFront Distribution

lusentis commented 7 years ago

@lcasartelli a couple of hints if you want to contribute, starting here: https://github.com/dawson-org/dawson-cli/blob/master/src/factories/cf_cloudfront.js#L65

The if statement should become something similar to:

if (!alias || skipAcmCertificate) {

skipAcmCertificate should be passed down by deploy.js (https://github.com/dawson-org/dawson-cli/blob/master/src/commands/deploy.js#L224), which sets a value for this flag in the run method at the bottom of the file. You should also add the --skip-acm description to index.js in the deploy command help. You should also skip the code that requests a new certificate (in deploy.js) when such option is specified.

lusentis commented 7 years ago

just to be clear, "skipping creating a certificate" should be a temporary workaround (e.g.: you may want to perform a quick deploy / your customer is on holiday and cannot forward the approval email to you etc.). That said, we do want to add a --skip-acm CLI option. We do not want to implement a config setting in the package.json.