View on GitHub

rain

A development workflow tool for working with AWS CloudFormation.

rain deploy

Deploy a CloudFormation stack or changeset from a local template

Synopsis

Creates or updates a CloudFormation stack named from the template file

If a template needs to be packaged before it can be deployed, rain will package the template first. Rain will attempt to create an S3 bucket to store artifacts that it packages and deploys. The bucket’s name will be of the format rain-artifacts--.

The config flag can be used to programmatically set tags and parameters. The format is similar to the “Template configuration file” for AWS CodePipeline just without the ‘StackPolicy’ key. The file can be in YAML or JSON format.

JSON: { “Parameters” : { “NameOfTemplateParameter” : “ValueOfParameter”, … }, “Tags” : { “TagKey” : “TagValue”, … } }

YAML: Parameters: NameOfTemplateParameter: ValueOfParameter … Tags: TagKey: TagValue …

To create a changeset (with optional stackName and changeSetName):

rain deploy –no-exec

To execute a changeset:

rain deploy –changeset

To list and delete changesets, use the ls and rm commands.

rain deploy <template> [stack]

Options

      --changeset                execute the changeset, rain deploy --changeset <stackName> <changeSetName>
  -c, --config string            YAML or JSON file to set tags and parameters
  -d, --detach                   once deployment has started, don't wait around for it to finish
      --experimental             Acknowledge that you want to deploy with an experimental feature
  -h, --help                     help for deploy
      --ignore-unknown-params    Ignore unknown parameters
  -k, --keep                     keep deployed resources after a failure by disabling rollbacks
      --nested-change-set        Whether or not to include nested stacks in the change set (default true)
  -x, --no-exec                  do not execute the changeset
      --node-style string        Set the node output style to tagged, doublequoted, singlequoted, literal, folded, quotescalars, original, or flow (default "original")
      --params strings           set parameter values; use the format key1=value1,key2=value2
  -p, --profile string           AWS profile name; read from the AWS CLI configuration file
  -r, --region string            AWS region to use
      --role-arn string          ARN of an IAM role that CloudFormation should assume to deploy the stack
      --s3-bucket string         Name of the S3 bucket that is used to upload assets
      --s3-owner string          The account where S3 assets are stored
      --s3-prefix string         Prefix to add to objects uploaded to S3 bucket
      --tags strings             add tags to the stack; use the format key1=value1,key2=value2
  -t, --termination-protection   enable termination protection on the stack
  -y, --yes                      don't ask questions; just deploy

Options inherited from parent commands

      --debug       Output debugging information
      --no-colour   Disable colour output

SEE ALSO

Auto generated by spf13/cobra on 17-Dec-2024