Inputs are used to collect customer provider values, for configuring your app.

Defining App Inputs

Add inputs to your app using the following configuration block

name         = "vpc_id"
display_name = "VPC ID"
description  = "ID of the VPC to install the app into."
default      = ""
required     = true
sensitive    = false

Configuration Using App Inputs

App inputs can be used to configure both sandboxes and components. All inputs are made available via variable configuration.

All inputs are accessed using {{.nuon.install.inputs.<input-name>}}.

Configuring Sandboxes

You can configure sandboxes by using install inputs as vars.

For example, to use the vpc_id input, as a variable to configure the aws-eks-byovpc sandbox:

terraform_version = "1.6.3"
directory = "aws-eks-byovpc"
repo      = "nuonco/sandboxes"
branch    = "main"
vpc_id = "{{.nuon.install.inputs.vpc_id}}"

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.

name              = "database"
type              = "terraform_module"
terraform_version = "1.6.3"
directory = "terraform"
repo      = "your-org/your-repo"
branch    = "main"
DATABASE_PASSWORD = "{{.nuon.install.inputs.database_password}}"
DATABASE_HOST     = "{{.nuon.install.inputs.database_host}}"

To use inputs in a Helm chart.

name   = "database"
directory = "helm"
repo      = "your-org/your-repo"
branch    = "main"
DATABASE_PASSWORD = "{{.nuon.install.inputs.database_password}}"
DATABASE_HOST     = "{{.nuon.install.inputs.database_host}}"

To use inputs in a Docker image.

name   = "docker-build"
type   = "docker_build"
directory = "."
repo      = "your-org/your-repo"
branch    = "main"
# use an input to pass in a docker registry password, when building an image
docker_build_registry_password = "{{.nuon.install.inputs.docker_build_registry_password}}"

To use inputs in a Kubernetes job.

name      = "job"
type      = "job"
image_url = "httpbin"
tag       = "latest"
ENV_VAR_API_TOKEN = "{{.nuon.install.inputs.api_token}}"

App Input Groups

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.

name = "sandbox"
description = "Sandbox inputs"
display_name = "Sandbox inputs"

name = "vpc_id"
description = "vpc_id to install application into"
default = ""
sensitive = false
display_name = "VPC ID"
group = "sandbox"

App Inputs For Customer Resources

App 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

The nuon managed sandboxes offer “bring-your-own-vpc” options, where inputs are used to accept the ID of a customer managed VPC for installation.

You can even use app inputs to manage resources from third party cloud providers.

Updating Inputs

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.