Skip to content

Commit

Permalink
docs: update parameters doc with allowable types (#1792)
Browse files Browse the repository at this point in the history
* update parameters doc with allowable types

Signed-off-by: “adnan” <[email protected]>

* to squash: address wording issues

Signed-off-by: “adnan” <[email protected]>

* to squash: add parameters-type section

Signed-off-by: “adnan” <[email protected]>
  • Loading branch information
adnxn authored Oct 11, 2021
1 parent 33d8e79 commit 896577f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 8 additions & 0 deletions docs/content/author-bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ See [Using Mixins](/use-mixins) to learn more about how mixins work.
Parameters are part of the [CNAB Spec](https://github.com/cnabio/cnab-spec/blob/master/101-bundle-json.md#parameters) and
allow you to pass in configuration values when you execute the bundle.

### Parameter Types

* string
* integer
* number
* boolean
* [file](#file-parameters)

Learn more about [how parameters work in Porter](/parameters/).

```yaml
Expand Down
12 changes: 7 additions & 5 deletions docs/content/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ aliases:
- /how-parameters-work/
---

When you are authoring a bundle, you can define what parameters your bundle
requires such as username and password values for a backing database, or the
region that a certain resource should be deployed in, etc. Then in your
action's steps you can reference the parameters using porter's template
language `{{ bundle.parameters.db_name }}`.
When you are authoring a bundle, you can define parameters that are required by
your bundle. These parameters are restricted to a list of [allowable data
types](/author-bundles/#parameter-types) and are used to define parameters such as
username and password values for a backing database, or the region that a
certain resource should be deployed in, etc. Then in your action's steps you can
reference the parameters using porter's template language `{{
bundle.parameters.db_name }}`.

Parameter values are resolved from a combination of supplied parameter set
files, user-specified overrides and defaults defined by the bundle itself.
Expand Down

0 comments on commit 896577f

Please sign in to comment.