Class: Lono::Cfn::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/lono/cfn/help.rb

Class Method Summary collapse

Class Method Details

.createObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/lono/cfn/help.rb', line 3

def create
<<-EOL
Examples:

Provided that you are in a lono project and have a `my-stack` lono template definition.  To create a stack you can simply run:

$ lono cfn create my-stack

The above command will generate and use the template in output/my-stack.json and parameters in params/my-stack.txt.  The template by convention defaults to the name of the stack.  In turn, the params by convention defaults to the name of the template.

Here are examples of overriding the template and params name conventions.

$ lono cfn create my-stack --template different1

The template used is output/different1.json and the parameters used is output/params/prod/different1.json.

$ lono cfn create my-stack --params different2

The template used is output/my-stack.json and the parameters used is output/params/prod/different2.json.

$ lono cfn create my-stack --template different3 --params different4

The template used is output/different3.json and the parameters used is output/params/prod/different4.json.

EOL
end

.deleteObject



57
58
59
60
61
62
63
64
65
# File 'lib/lono/cfn/help.rb', line 57

def delete
<<-EOL
Examples:

$ lono cfn delete my-stack

The above command will delete my-stack.
EOL
end

.diffObject



83
84
85
86
87
88
89
90
91
# File 'lib/lono/cfn/help.rb', line 83

def diff
<<-EOL
Displays code diff of the generated CloudFormation template locally vs the existing template on AWS. You can set a desired diff viewer by setting the LONO_CFN_DIFF environment variable.

Examples:

$ lono cfn diff my-stack
EOL
end

.downloadObject



93
94
95
96
97
98
99
100
101
# File 'lib/lono/cfn/help.rb', line 93

def download
<<-EOL
Download CloudFormation template from existing template on AWS.

Examples:

$ lono cfn download my-stack
EOL
end

.previewObject



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/lono/cfn/help.rb', line 67

def preview
<<-EOL
Generates a CloudFormation preview.  This is similar to a `terraform plan` or puppet's dry-run mode.

Example output:

CloudFormation preview for 'example' stack update. Changes:

Remove AWS::Route53::RecordSet: DnsRecord testsubdomain.sub.tongueroo.com

Examples:

$ lono cfn preview my-stack
EOL
end

.updateObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/lono/cfn/help.rb', line 30

def update
<<-EOL
Examples:

Provided that you are in a lono project and have a `my-stack` lono template definition.  To update a stack you can simply run:

$ lono cfn update my-stack

The above command will generate and use the template in output/my-stack.json and parameters in params/my-stack.txt.  The template by convention defaults to the name of the stack.  In turn, the params by convention defaults to the name of the template.

Here are examples of overriding the template and params name conventions.

$ lono cfn update my-stack --template different1

The template used is output/different1.json and the parameters used is output/params/prod/different1.json.

$ lono cfn update my-stack --params different2

The template used is output/my-stack.json and the parameters used is output/params/prod/different2.json.

$ lono cfn update my-stack --template different3 --params different4

The template used is output/different3.json and the parameters used is output/params/prod/different4.json.

EOL
end