Skip to content

Commit

Permalink
chore (docs): Replaced tools text w/output from cdk --help v0.17.0 (#…
Browse files Browse the repository at this point in the history
…1207)

* Replaced tools text w/output from cdk --help v0.17.0

* Update tools.rst
  • Loading branch information
Doug-AWS authored Nov 19, 2018
1 parent 1c9ccfc commit 127bb59
Showing 1 changed file with 60 additions and 59 deletions.
119 changes: 60 additions & 59 deletions docs/src/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,81 +19,82 @@
Command-line Toolkit (cdk)
==========================

``cdk`` (the |toolkit|) is the main tool you use to interact with your |*CDK App*|. It will execute
the CDK app you have written and compiled, interrogate the application
model you have defined, and produce and deploy the CloudFormation templates
generated by it.
``cdk`` (the |toolkit|) is the main tool you use to interact with your |*CDK App*|. It executes
the CDK app you have written and compiled, interrogates the application
model you have defined, and produces and deploys the |CFN| templates
generated by the |cdk|.

You have to tell ``cdk`` what command to use to run your CDK app using the
``--app`` option. For example:
There are two ways that you can tell ``cdk`` what command to use to run your CDK app.
The first way is to include an explicit ``--app`` option whenever you use a ``cdk`` command:

.. code-block:: sh
cdk --app 'node bin/main.js' synth
Because this is rather tedious to repeat every time, you will generally put
this option in a file called *cdk.json*:
The second way is to add the following entry to
the file *cdk.json*:

.. code-block:: javascript
{
"app": "node bin/main.js"
}
Below are the actions you can take on your CDK app:
Here are the actions you can take on your CDK app
(this is the output of the ``cdk --help`` command):

.. code-block:: sh
Usage: cdk -a <cloud-executable> COMMAND
Commands:
docs Opens the documentation in a browser
list Lists all stacks in the cloud executable (alias:
ls)
synth [STACKS..] Synthesizes and prints the cloud formation
template for this stack (alias: synthesize,
construct, cons)
bootstrap [ENVIRONMENTS..] Deploys the CDK toolkit stack into an AWS
environment
deploy [STACKS...] Deploys the stack(s) named STACKS into your AWS
account
destroy [STACKS...] Destroy the stack(s) named STACKS
diff [STACK] Compares the specified stack with the deployed
stack or a local template file
metadata [STACK] Returns all metadata associated with this stack
init [TEMPLATE] Create a new, empty CDK project from a template.
Invoked without TEMPLATE, the app template will be
used.
doctor Check your set-up for potential problems
Options:
--app, -a REQUIRED: Command-line for executing your CDK app (e.g.
"node bin/my-app.js") [string]
--context, -c Add contextual string parameter. [array]
--plugin, -p Name or path of a node package that extend the CDK
features. Can be specified multiple times [array]
--rename Rename stack name if different then the one defined in
the cloud executable [string]
--trace Print trace for stack warnings [boolean]
--strict Do not construct stacks with warnings [boolean]
--ignore-errors Ignores synthesis errors, which will likely produce an
invalid output [boolean] [default: false]
--json, -j Use JSON output instead of YAML [boolean]
--verbose, -v Show debug logs [boolean]
--profile Use the indicated AWS profile as the default environment
[string]
--proxy Use the indicated proxy. Will read from HTTPS_PROXY
environment variable if not specified. [string]
--version-reporting Disable insersion of the CDKMetadata resource in
synthesized templates [boolean]
--version Show version number [boolean]
--help Show help [boolean]
If your app has a single stack, there is no need to specify the stack name
If one of cdk.json or ~/.cdk.json exists, options specified there will be used
as defaults. Settings in cdk.json take precedence.
Usage: cdk -a <cdk-app> COMMAND
Commands:
list Lists all stacks in the app [aliases: ls]
synthesize [STACKS..] Synthesizes and prints the CloudFormation template
for this stack [aliases: synth]
bootstrap [ENVIRONMENTS..] Deploys the CDK toolkit stack into an AWS
environment
deploy [STACKS..] Deploys the stack(s) named STACKS into your AWS
account
destroy [STACKS..] Destroy the stack(s) named STACKS
diff [STACK] Compares the specified stack with the deployed
stack or a local template file
metadata [STACK] Returns all metadata associated with this stack
init [TEMPLATE] Create a new, empty CDK project from a template.
Invoked without TEMPLATE, the app template will be
used.
docs Opens the documentation in a browser[aliases: doc]
doctor Check your set-up for potential problems
Options:
--app, -a REQUIRED: Command-line for executing your CDK app (e.g.
"node bin/my-app.js") [string]
--context, -c Add contextual string parameter. [array]
--plugin, -p Name or path of a node package that extend the CDK
features. Can be specified multiple times [array]
--rename Rename stack name if different then the one defined in
the cloud executable [string]
--trace Print trace for stack warnings [boolean]
--strict Do not construct stacks with warnings [boolean]
--ignore-errors Ignores synthesis errors, which will likely produce an
invalid output [boolean] [default: false]
--json, -j Use JSON output instead of YAML [boolean]
--verbose, -v Show debug logs [boolean]
--profile Use the indicated AWS profile as the default environment
[string]
--proxy Use the indicated proxy. Will read from HTTPS_PROXY
environment variable if not specified. [string]
--ec2creds, -i Force trying to fetch EC2 instance credentials. Default:
guess EC2 instance status. [boolean]
--version-reporting Disable insersion of the CDKMetadata resource in
synthesized templates [boolean]
--role-arn, -r ARN of Role to use when invoking CloudFormation [string]
--version Show version number [boolean]
--help Show help [boolean]
If your app has a single stack, there is no need to specify the stack name
If one of cdk.json or ~/.cdk.json exists, options specified there will be used
as defaults. Settings in cdk.json take precedence.
.. _version-reporting:
Expand Down

0 comments on commit 127bb59

Please sign in to comment.