Inputs are used to collect customer provider values for configuring your App.
Inputs are configured in a inputs.toml file inside the root of your app
directory.
Add Inputs to your App using the following configuration block
#:schema https://api.nuon.co/v1/general/config-schema?type=inputs
[[group]]
name = "network"
description = "Configure the install's network settings."
display_name = "Network"
name = "vpc_id"
display_name = "VPC ID"
group = "network"
description = "ID of the VPC to install the app into."
default = ""
required = true
sensitive = false
Inputs can be used to configure both Sandboxes and Components. All Inputs are
made available via variable configuration.
Inputs are defined in a inputs.toml file inside the root of your app
directory.
All Inputs are accessed using {{.nuon.install.inputs.<input-name>}}.
Configuring Sandboxes
You can configure Sandboxes by using Inputs as vars.
For example, to use the root_domain Input, as a variable to configure the
Sandbox:
#:schema https://api.nuon.co/v1/general/config-schema?type=sandbox
terraform_version = "1.11.3"
[public_repo]
directory = "."
repo = "nuonco/aws-eks-karpenter-sandbox"
branch = "main"
[vars]
public_root_domain = "{{ .nuon.inputs.inputs.root_domain }}"
Configuring Components
Depending upon the Component type, you can use install Inputs to configure
Components using Helm values, Terraform variables or environment variables.
To use Inputs in a Terraform module.
#:schema https://api.nuon.co/v1/general/config-schema?type=terraform
type = "terraform_module"
name = "database"
terraform_version = "1.11.3"
[public_repo]
directory = "terraform"
repo = "your-org/your-repo"
branch = "main"
[vars]
DATABASE_PASSWORD = "{{.nuon.install.inputs.database_password}}"
DATABASE_HOST = "{{.nuon.install.inputs.database_host}}"
To use inputs in a Helm chart Component.
components/helm-database.toml
#:schema https://api.nuon.co/v1/general/config-schema?type=helm
type = "helm_chart"
name = "helm-database"
chart_name = "database"
[public_repo]
directory = "helm"
repo = "your-org/your-repo"
branch = "main"
[values]
DATABASE_PASSWORD = "{{.nuon.install.inputs.database_password}}"
DATABASE_HOST = "{{.nuon.install.inputs.database_host}}"
To use inputs in a Docker image.
components/docker-build.toml
#:schema https://api.nuon.co/v1/general/config-schema?type=docker-build
type = "docker_build"
name = "docker-build"
[public_repo]
directory = "."
repo = "your-org/your-repo"
branch = "main"
# use an input to pass in a docker registry password, when building an image
[vars]
docker_build_registry_password = "{{.nuon.install.inputs.docker_build_registry_password}}"
You can organize Inputs into Groups, which are useful for structuring how they
are visualized in the installer. By default, all Inputs are created in the
default group.
To create a Group, and add an Input to it, simply declare the Group in your
config or terraform and set the group field on any input belonging to it.
#:schema http://localhost:8081/v1/general/config-schema?type=inputs
[[group]]
name = "db"
description = "Configuration for the database "
display_name = "Database configuration"
[[input]]
name = "db_password"
description = "Password to use for the database."
default = ""
sensitive = true
display_name = "Password"
group = "db"
Inputs are commonly used to allow a customer to provide access to existing
resources. For example, an Input can be used for:
- accepting a database url, or database ID to connect to
- accepting a VPC ID to install an app into
- accepting a token to access a third party cloud provider or account
You can even use Inputs to manage resources from
third party cloud providers.
If you add a required Input after an install is created, the Inputs must be
added to the Install before it can process any new Sandbox updates or Component
provision/deprovision jobs.
Currently, updating Inputs is only supported via our
api.
We recommend avoiding adding backwards incompatible Input changes in the same
App.