Introducing the lono import Command

Introducing the lono import Command

Embarrassingly, I’ve been converting raw CloudFormation templates to lono CloudFormation templates manually. Probably one of the reasons why it’s been neglected is because this process is so simple, but it is ripe for automation. This should have been done this a long ago.

Introducing lono import

General form:

lono import [SOURCE]
lono import help

Example:

lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceWithSecurityGroupSample.template

What did that do?

  1. Downloads the EC2InstanceWithSecurityGroupSample.template to the templates/.
  2. Converts the format to YAML. YAML is the default but you can using the --format option if you prefer JSON.
  3. Writes the result to templates/ec2-instance-with-security-group-sample.yml.
  4. It adds a template configuration to config/templates/base/stacks.rb.

Template name: CamelCase or dasherize

You can specify to use CamelCase or dasherize casing for the name of the final template file with the --casing option. Examples:

Dasherize:

$ lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceWithSecurityGroupSample.template --casing dasherize
Template downloaded to ./templates/ec2-instance-with-security-group-sample.yml.

CamelCase:

$ lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceWithSecurityGroupSample.template --casing camelcase
Template downloaded to ./templates/EC2InstanceWithSecurityGroupSample.yml.

The official documentation for the lono import command is on lono.cloud. Hope this helps!

Thanks for reading this far. If you found this article useful and would like to see more articles like this follow me. I'd really appreciate it also if you like this article (by clicking the ?? button) so others can find it too! Also connect with me on  LinkedIn.
P.S. Be sure to  subscribe to receive free DevOps tips and updates.

要查看或添加评论,请登录

Tung Nguyen的更多文章

社区洞察

其他会员也浏览了