Skip to content

Commit

Permalink
Merge pull request #563 from ericzbeard/v-1-17-0
Browse files Browse the repository at this point in the history
Release 1.17.0
  • Loading branch information
ericzbeard authored Oct 21, 2024
2 parents f6d95e8 + e0d49b0 commit c400275
Show file tree
Hide file tree
Showing 144 changed files with 6,721 additions and 4,045 deletions.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,71 @@ Resources {
BucketName = cfn.Ref("Name")
}
}
```

## Constants

You can put constants into the `Rain` section in the template and then refer to
those constants later in the template. Constants can be strings or entire
objects (but only strings can be used later in Sub functions). Use the
`!Rain::Constant` directive to refer to a constant in the template. For
strings, you can add constants to `!Sub` string with the
`${Rain::ConstantName}` pseudo-parameter. Constants can contain previosuly
declared constants in Sub strings using the same format. The `Rain` section
gets removed during packaging.

```yaml
Parameters:
Prefix:
Type: String
Rain:
Constants:
Test1: ezbeard-rain-test-constants
Test2: !Sub ${Prefix}-${Rain::Test1}-SubTest
Resources:
Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Rain::Constant Test1
Bucket2:
Type: AWS::S3::Bucket
Properties:
BucketName: !Rain::Constant Test2
Bucket3:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub "pre-${Prefix}-${Rain::Test1}-suffix"
```

Run `rain pkg` on that template to produce the following output:

```yaml
Parameters:
Prefix:
Type: String
Resources:
Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ezbeard-rain-test-constants
Bucket2:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub ${Prefix}-ezbeard-rain-test-constants-SubTest
Bucket3:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub pre-${Prefix}-ezbeard-rain-test-constants-suffix
```


## Other CloudFormation tools

* [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint)
Expand Down
62 changes: 62 additions & 0 deletions docs/README.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,71 @@ Resources {
BucketName = cfn.Ref("Name")
}
}
```

## Constants

You can put constants into the `Rain` section in the template and then refer to
those constants later in the template. Constants can be strings or entire
objects (but only strings can be used later in Sub functions). Use the
`!Rain::Constant` directive to refer to a constant in the template. For
strings, you can add constants to `!Sub` string with the
`${Rain::ConstantName}` pseudo-parameter. Constants can contain previosuly
declared constants in Sub strings using the same format. The `Rain` section
gets removed during packaging.

```yaml
Parameters:
Prefix:
Type: String

Rain:
Constants:
Test1: ezbeard-rain-test-constants
Test2: !Sub ${Prefix}-${Rain::Test1}-SubTest

Resources:
Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Rain::Constant Test1

Bucket2:
Type: AWS::S3::Bucket
Properties:
BucketName: !Rain::Constant Test2

Bucket3:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub "pre-${Prefix}-${Rain::Test1}-suffix"
```

Run `rain pkg` on that template to produce the following output:

```yaml
Parameters:
Prefix:
Type: String

Resources:
Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ezbeard-rain-test-constants

Bucket2:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub ${Prefix}-ezbeard-rain-test-constants-SubTest

Bucket3:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub pre-${Prefix}-ezbeard-rain-test-constants-suffix
```


## Other CloudFormation tools

* [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint)
Expand Down
2 changes: 2 additions & 0 deletions docs/bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,8 @@ _rain_deploy()
flags+=("-k")
local_nonpersistent_flags+=("--keep")
local_nonpersistent_flags+=("-k")
flags+=("--nested-change-set")
local_nonpersistent_flags+=("--nested-change-set")
flags+=("--no-exec")
flags+=("-x")
local_nonpersistent_flags+=("--no-exec")
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Rain is a command line tool for working with AWS CloudFormation templates and st
* [rain tree](rain_tree.md) - Find dependencies of Resources and Outputs in a local template
* [rain watch](rain_watch.md) - Display an updating view of a CloudFormation stack

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain bootstrap

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ rain build [<resource type>] or <prompt>

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ rain cat <stack>

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_cc.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ You must pass the --experimental (-x) flag to use this command, to acknowledge t
* [rain cc rm](rain_cc_rm.md) - Delete a deployment created by cc deploy (Experimental!)
* [rain cc state](rain_cc_state.md) - Download the state file for a template deployed with cc deploy

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_cc_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ rain cc deploy <template> <name>

* [rain cc](rain_cc.md) - Interact with templates using Cloud Control API instead of CloudFormation

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_cc_drift.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ rain cc drift <name>

* [rain cc](rain_cc.md) - Interact with templates using Cloud Control API instead of CloudFormation

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_cc_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ rain cc rm <name>

* [rain cc](rain_cc.md) - Interact with templates using Cloud Control API instead of CloudFormation

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_cc_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ rain cc state <name>

* [rain cc](rain_cc.md) - Interact with templates using Cloud Control API instead of CloudFormation

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_console.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ rain console [stack]

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
3 changes: 2 additions & 1 deletion docs/rain_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ rain deploy <template> [stack]
-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
Expand All @@ -85,4 +86,4 @@ rain deploy <template> [stack]

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ rain diff <from> <to>

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_fmt.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ rain fmt <filename>...

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_forecast.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ rain forecast --experimental <template> [stackName]

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain info

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ rain logs <stack> (<resource>)

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ rain ls <stack> [changeset]

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain merge <template> <template> ...

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ The rain module command can be used to publish modules to CodeArtifact, and to i
* [rain module install](rain_module_install.md) - Install a package of Rain modules from CodeArtifact
* [rain module publish](rain_module_publish.md) - Publish a directory of Rain modules to CodeArtifact

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_module_bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ rain module bootstrap [flags]

* [rain module](rain_module.md) - Interact with Rain modules in CodeArtifact

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_module_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain module install <name> [flags]

* [rain module](rain_module.md) - Interact with Rain modules in CodeArtifact

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_module_publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain module publish <name> [flags]

* [rain module](rain_module.md) - Interact with Rain modules in CodeArtifact

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_pkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ rain pkg <template>

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ rain rm <stack> [changeset]

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_stackset.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ This command manipulates stack sets. It has no action if specific stack set comm
* [rain stackset ls](rain_stackset_ls.md) - List a CloudFormation stack sets in a given region
* [rain stackset rm](rain_stackset_rm.md) - Delete a CloudFormation stack set and/or its instances.

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_stackset_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ rain stackset deploy <template> [stackset] [flags]

* [rain stackset](rain_stackset.md) - This command manipulates stack sets.

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_stackset_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ rain stackset ls <stack set>

* [rain stackset](rain_stackset.md) - This command manipulates stack sets.

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_stackset_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ rain stackset rm <stackset>

* [rain stackset](rain_stackset.md) - This command manipulates stack sets.

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain tree [template]

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
2 changes: 1 addition & 1 deletion docs/rain_watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ rain watch <stack>

* [rain](index.md) -

###### Auto generated by spf13/cobra on 3-Oct-2024
###### Auto generated by spf13/cobra on 21-Oct-2024
Loading

0 comments on commit c400275

Please sign in to comment.