Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a parameter source from a dependency output #385

Open
carolynvs opened this issue Aug 26, 2020 · 0 comments
Open

Define a parameter source from a dependency output #385

carolynvs opened this issue Aug 26, 2020 · 0 comments

Comments

@carolynvs
Copy link
Contributor

Porter has the concept of a parameter source that is populated from dependency output. For example:

The wordpress bundle has a dependencies custom section that requires the mysql bundle. The mysql bundle generates a connstr output representing the connection string to the database. The parameter source dependencies.output allows the wordpress bundle to inject the connstr output from mysql to one of its parameters so that it can use the connection string created by the mysql bundle.

{
    "custom": {
        "io.cnab.dependencies": {
            "requires": {
                "mysql": {
                    "bundle": "mysql:v0.5.7"
                }
            }
        },
        "io.cnab.parameter-sources": {
            "porter-connstr": {
                "priority": [
                    "dependencies.output"
                ],
                "sources": {
                    "dependencies.output": {
                        "dependency": "mysql",
                        "name": "connstr"
                    }
                }
            }
        }
    }
}

This seems useful to have in the CNAB spec for parameter sources. So that if a bundle has a dependency defined, the author can choose to default a parameter using a dependency output and have it supported across tools.

@carolynvs carolynvs changed the title Defined a parameter source from a dependency output Define a parameter source from a dependency output Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant