CtrlK
BlogDocsLog inGet started
Tessl Logo

nullstone/nullstone-config-files

Use when creating or editing Nullstone IaC YAML files under `.nullstone/` — adding or wiring apps, datastores, networks, domains, subdomains, ingresses, clusters, cluster-namespaces; setting `vars`, `environment`, `connections`, or `capabilities`; configuring `events`. Triggers on file paths `.nullstone/config.yml`, `.nullstone/{env}.yml`, `.nullstone/previews.yml`, and anything under `.nullstone/stacks/{stack}/`.

80

Quality

100%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

apps.mdreferences/docs/

apps top-level element

An app is a logical representation of a service or application. There are four types of application patterns: container, serverless, static site, or VM-based. The pattern for an application is defined by the selected Nullstone module as configured in the module parameter.

An app has the same schema as a block with additional attributes for environment variables and capabilities.

Examples

Fargate Container

apps:
  api:
    module: nullstone/aws-fargate-service
    vars:
      num_tasks: 1
      cpu: 256
      memory: 512
    environment:
      LOG_LEVEL: info
      BASE_URL: "{{ NULLSTONE_ENV }}.acme.com"
    capabilities:
      - name: postgres
        module: nullstone/aws-postgres-access
        connections:
          postgres: postgres
    connections:
      cluster-namespace: namespace0

Attributes

module

See blocks#module.

module_version

See blocks#module_version.

vars

See blocks#vars.

connections

See blocks#connections.

environment

The environment refers to "Custom" environment variables that are injected into an application.

Nullstone injects environment variables into applications by merging environment variables from three sources:

When specified in .nullstone/config.yml, environment overrides any "Custom" env variables configured in the Nullstone UI. When specified in an overrides file, environment appends entries to the existing set of environment variables defined in the Nullstone UI or in .nullstone/config.yml.

Nullstone supports Env Var Interpolation in environment variable values. You can interpolate values from any of the three env var sources (Standard, Capabilities, Custom). You may also interpolate multiple environment variables in one value. Example:

apps:
  api:
    environment:
      BASE_DOMAIN: "{{ NULLSTONE_ENV }}.acme.com" # "dev.acme.com"
      DASHBOARD_URL: "https://dashboard.{{ BASE_DOMAIN }}" # https://dashboard.dev.acme.com

Nullstone also supports Secret References using secret(...). This allows you to manually add a secret to a vault (e.g. AWS Secrets Manager) and inject into your application.

Example:

apps:
  api:
    environment:
      STRIPE_API_KEY: "{{ secret(arn:aws:secretsmanager:us-east-1:0123456789012:secret:stripe_api_key) }}"

For Kubernetes workloads, Nullstone also supports k8s.* template functions to source values from the downward API, ConfigMaps, resource fields, and files.

Example:

apps:
  api:
    environment:
      POD_IP: "{{ k8s.field(v1, status.podIP) }}"
      MY_CONFIG: "{{ k8s.configMap(my-key, my-configmap) }}"
      CPU_LIMIT: "{{ k8s.resourceField(limits.cpu) }}"

capabilities

The capabilities section acts as "glue" infrastructure for applications. This gives the application access to datastores, third parties, and much more. See Capabilities for more information about capabilities.

See app capabilities.

SKILL.md

tile.json