Inputs are used to collect customer provider values, for configuring your app.
Add inputs to your app using the following configuration block
description = " ID of the VPC to install the app into. "
resource "nuon_app_input" "<your-app>" {
app_id = nuon_app .< your - app >. id
description = " ID of the VPC to install the app into. "
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 var
s.
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 "
vpc_id = " {{.nuon.install.inputs.vpc_id}} "
resource "nuon_app_sandbox" "<your-app>" {
app_id = nuon_app .< your - app >. id
terraform_version = " 1.6.3 "
repo = " nuonco/sandboxes "
directory = " aws-eks-byovpc "
value = " {{.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.
type = " terraform_module "
terraform_version = " 1.6.3 "
[components.connected_repo]
repo = " your-org/your-repo "
DATABASE_PASSWORD = " {{.nuon.install.inputs.database_password}} "
DATABASE_HOST = " {{.nuon.install.inputs.database_host}} "
resource "nuon_terraform_module_component" "database" {
app_id = nuon_app .< your - app >. id
terraform_version = " 1.6.3 "
repo = " your-org/your-repo "
name = " DATABASE_PASSWORD "
value = " {{.nuon.install.inputs.database_password}} "
value = " {{.nuon.install.inputs.database_host}} "
To use inputs in a Helm chart.
[components.connected_repo]
repo = " your-org/your-repo "
DATABASE_PASSWORD = " {{.nuon.install.inputs.database_password}} "
DATABASE_HOST = " {{.nuon.install.inputs.database_host}} "
resource "nuon_helm_chart_component" "app" {
app_id = nuon_app .< your - app >. id
repo = " your-org/your-repo "
name = " DATABASE_PASSWORD "
value = " {{.nuon.install.inputs.database_password}} "
value = " {{.nuon.install.inputs.database_host}} "
To use inputs in a Docker image.
[components.connected_repo]
repo = " your-org/your-repo "
# 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}} "
resource "nuon_docker_build_component" "docker-build" {
app_id = nuon_app .< your - app >. id
repo = " your-org/your-repo "
# use an input to pass in a docker registry password, when building an image
name = " docker_build_registry_password "
value = " {{.nuon.install.inputs.docker_build_registry_password}} "
To use inputs in a Kubernetes job.
ENV_VAR_API_TOKEN = " {{.nuon.install.inputs.api_token}} "
resource "nuon_job_component" "job" {
app_id = nuon_app .< your - app >. id
# use an input to pass in some type of api token
name = " ENV_VAR_API_TOKEN "
value = " {{.nuon.install.inputs.api_token}} "
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.
description = " Sandbox inputs "
display_name = " Sandbox inputs "
description = " vpc_id to install application into "
resource "nuon_app_input_config" "app" {
app_id = nuon_app .< your - app >. id
description = " inputs for a sandbox "
display_name = " Sandbox Inputs "
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 .
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 .