{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/ize-toml/versions/1.1.5.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/hazelops/ize/1.1.5/internal/schema/ize-spec.json",
    "sourceSha256": "60fd7c3cbf04f1ed5d35d540563294113c43b9e0d1a52683426e3a08382aead5",
    "fileMatch": [
      "ize.toml"
    ],
    "parsers": [
      "toml"
    ]
  },
  "type": "object",
  "properties": {
    "aws_profile": {
      "type": "string",
      "description": "(optional) AWS Profile can be specified here (but normally it's specified via AWS_PROFILE env var)"
    },
    "aws_region": {
      "type": "string",
      "description": "(required) AWS Region of this environment should be specified here. Can be overridden by AWS_PROFILE env var or --aws-region flag."
    },
    "config_file": {
      "type": "string",
      "description": "(optional) Path to ize.toml config file can be specified, but normally it's read from the environment's directory automatically."
    },
    "env": {
      "type": "string",
      "description": "(optional) Environment name can be specified here. Normally it should be passed via `ENV` variable or --env flag."
    },
    "env_dir": {
      "type": "string",
      "description": "(optional) Environment directory can be specified here. Normally it's calculated automatically based on the directory structure convention."
    },
    "home": {
      "type": "string",
      "description": "(optional) User home directory can be specified here. Normally $HOME is used."
    },
    "ize_dir": {
      "type": "string",
      "description": "(optional) Ize directory can be specified here. Normally it's assumed to be .infra or .ize in the current repo."
    },
    "log_level": {
      "type": "string",
      "description": "(optional) Log level can be specified here. Possible levels: info, debug, trace, panic, warn, error, fatal(default). Can be overridden via IZE_LOG_LEVEL env var or via --log-level flag."
    },
    "namespace": {
      "type": "string",
      "description": "(required) Namespace of the project can be specified here. It is used as a base for all naming. It can be overridden by NAMESPACE env var or --namespace flag."
    },
    "plain_text": {
      "description": "(optional) Plain text output can be enabled here. Default is false. Can be overridden by IZE_PLAIN_TEXT env var or --plain-text flag.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "boolean"
        }
      ]
    },
    "prefer_runtime": {
      "type": "string",
      "description": "(optional) Prefer a specific runtime. (native or docker) (default 'native')"
    },
    "apps_path": {
      "type": "string",
      "description": "(optional) Path to apps directory can be set. By default apps are searched in 'apps' and 'projects' directories. This is needed in case your repo structure is not purely ize-structured (let's say you have 'src' repo in your dotnet app, as an example)"
    },
    "root_dir": {
      "type": "string",
      "description": "(optional) Project directory can be set here. By default it's the current directory, but in case you prefer to run ize from the outside of repo it may be useful (uncommon)."
    },
    "terraform_version": {
      "type": "string",
      "description": "(optional) Terraform version can be set here. 1.1.3 by default"
    },
    "docker_registry": {
      "type": "string",
      "description": "(optional) Docker registry can be set here. By default it uses ECR repo with the name of the service."
    },
    "tf_log_path": {
      "type": "string",
      "description": "(optional) TF_LOG_PATH can be set here."
    },
    "tag": {
      "type": "string",
      "description": "(optional) Tag can be set statically. Normally it is being constructed automatically based on the git revision."
    },
    "tf_log": {
      "type": "string",
      "description": "(optional) Terraform TF_LOG can be set here.  Can be TRACE, DEBUG, INFO, WARN or ERROR."
    },
    "custom_prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "boolean"
        }
      ],
      "description": "(optional) Custom prompt can be enabled here for all console connections. Default: false."
    },
    "tunnel": {
      "type": "object",
      "properties": {
        "bastion_instance_id": {
          "type": "string",
          "description": "Bastion instance ID."
        },
        "forward_host": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Forward host."
          }
        }
      },
      "description": "Tunnel configuration.",
      "additionalProperties": false
    },
    "app": {
      "deprecationMessage": "app block is deprecated",
      "description": "Apps configuration.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
          "$ref": "#/$defs/app"
        }
      }
    },
    "ecs": {
      "description": "Ecs apps configuration.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
          "$ref": "#/$defs/ecs"
        }
      }
    },
    "serverless": {
      "description": "Serverless apps configuration.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
          "$ref": "#/$defs/serverless"
        }
      }
    },
    "alias": {
      "description": "(optional) Alias mode can be enabled here. This can be used to combine various apps via depends_on parameter.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
          "$ref": "#/$defs/alias"
        }
      }
    },
    "terraform": {
      "description": "Terraform configuration.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
          "$ref": "#/$defs/terraform"
        }
      }
    },
    "infra": {
      "type": "object",
      "deprecationMessage": "infra block is deprecated",
      "properties": {
        "terraform": {
          "type": "object",
          "properties": {
            "version": {
              "type": "string",
              "description": "(optional) Terraform version can be set here. 1.1.3 by default."
            },
            "terraform_version": {
              "type": "string"
            },
            "state_bucket_region": {
              "type": "string",
              "description": "(optional) Terraform state bucket region can be specified here. Normally AWS_REGION is used here. Can be overridden via env vars or flags."
            },
            "state_bucket_name": {
              "type": "string",
              "description": "(optional) Terraform state bucket name can be specified here. Normally it's generated and defaults to <NAMESPACE>-tf-state"
            },
            "state_name": {
              "type": "string",
              "description": "(optional) Terraform state name that will be used in the .tfstate file. Normally it's 'terraform' or state name."
            },
            "root_domain_name": {
              "type": "string",
              "description": "(optional) Root domain name can be set here. This is the main domain that will be passed to the terraform. Generally if your app lives at 'api.dev.nutcorp.net' the root domain is `nutcorp.net`"
            },
            "aws_region": {
              "type": "string",
              "description": "(optional) Terraform-specific AWS Region of this environment should be specified here. Normally global AWS_REGION is used."
            },
            "aws_profile": {
              "type": "string",
              "description": "(optional) Terraform-specific AWS profile (optional) can be specified here (but normally it should be inherited from a global AWS_PROFILE)."
            }
          },
          "description": "Infrastructure configuration.",
          "additionalProperties": false
        },
        "tunnel": {
          "type": "object",
          "properties": {
            "bastion_instance_id": {
              "type": "string",
              "description": "Bastion instance ID."
            },
            "forward_host": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Forward host."
              }
            }
          },
          "description": "Tunnel configuration.",
          "additionalProperties": false
        }
      },
      "required": [
        "terraform"
      ],
      "description": "Infrastructure configuration."
    }
  },
  "$defs": {
    "app": {
      "deprecationMessage": "app block is deprecated",
      "description": "App configuration.",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "app type"
        },
        "file": {
          "type": "string",
          "description": "(optional) Path to serverless file can be specified here. Normally it's serverless.yml in the app directory."
        },
        "node_version": {
          "type": "string",
          "description": "(optional) Node version that will be used by nvm can be specified here that. Default is v14."
        },
        "create_domain": {
          "type": "boolean",
          "description": "(optional) Create domain for the serverless domain manager during the deployment."
        },
        "path": {
          "type": "string",
          "description": "(optional) Path to ecs app folder can be specified here. By default it's derived from apps path and app name."
        },
        "sls_node_modules_cache_mount": {
          "type": "string",
          "description": "(optional) SLS node_modules cache mount path can be specified here. It's used to store cache during CI/CD process."
        },
        "env": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "environment"
          },
          "description": "environments"
        },
        "unsafe": {
          "type": "boolean",
          "description": "(optional) Enables unsafe mode that increases deploy time on a cost of shorter healthcheck."
        },
        "image": {
          "type": "string",
          "description": "(optional) Docker image can be specified here. By default it's derived from the app name."
        },
        "cluster": {
          "type": "string",
          "description": "(optional) ECS cluster can be specified here. By default it's derived from env & namespace"
        },
        "task_definition_revision": {
          "type": "string",
          "description": "(optional) Task definition revision can be specified here. By default latest revision is used to perform a deployment. Normally this parameter can be used via cli during specific deployment needs."
        },
        "timeout": {
          "type": "integer",
          "description": "(optional) ECS deployment timeout can be specified here."
        },
        "docker_registry": {
          "type": "string",
          "description": "(optional) Docker registry can be set here. By default it uses ECR repo with the name of the service."
        },
        "skip_deploy": {
          "type": "boolean",
          "description": "(optional) skip deploy app."
        },
        "depends_on": {
          "type": "array",
          "description": "(optional) expresses startup and shutdown dependencies between apps"
        }
      },
      "additionalProperties": false
    },
    "ecs": {
      "description": "Ecs app configuration.",
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "(optional) Path to ecs app folder can be specified here. By default it's derived from apps path and app name."
        },
        "unsafe": {
          "type": "boolean",
          "description": "(optional) Enables unsafe mode that increases deploy time on a cost of shorter healthcheck."
        },
        "image": {
          "type": "string",
          "description": "(optional) Docker image can be specified here. By default it's derived from the app name."
        },
        "cluster": {
          "type": "string",
          "description": "(optional) ECS cluster can be specified here. By default it's derived from env & namespace"
        },
        "task_definition_revision": {
          "type": "string",
          "description": "(optional) Task definition revision can be specified here. By default latest revision is used to perform a deployment. Normally this parameter can be used via cli during specific deployment needs."
        },
        "timeout": {
          "type": "integer",
          "description": "(optional) ECS deployment timeout can be specified here."
        },
        "docker_registry": {
          "type": "string",
          "description": "(optional) Docker registry can be set here. By default it uses ECR repo with the name of the service."
        },
        "skip_deploy": {
          "type": "boolean",
          "description": "(optional) skip deploy app."
        },
        "icon": {
          "type": "string",
          "description": "(optional) set icon"
        },
        "aws_region": {
          "type": "string",
          "description": "(optional) ECS-specific AWS Region of this environment should be specified here. Normally global AWS_REGION is used."
        },
        "aws_profile": {
          "type": "string",
          "description": "(optional) ECS-specific AWS profile (optional) can be specified here (but normally it should be inherited from a global AWS_PROFILE)."
        },
        "depends_on": {
          "type": "array",
          "description": "(optional) expresses startup and shutdown dependencies between apps"
        }
      },
      "additionalProperties": false
    },
    "serverless": {
      "description": "Serverless app configuration.",
      "type": "object",
      "properties": {
        "file": {
          "type": "string",
          "description": "(optional) Path to serverless file can be specified here. Normally it's serverless.yml in the app directory."
        },
        "node_version": {
          "type": "string",
          "description": "(optional) Node version that will be used by nvm can be specified here that. Default is v14."
        },
        "create_domain": {
          "type": "boolean",
          "description": "(optional) Create domain for the serverless domain manager during the deployment."
        },
        "path": {
          "type": "string",
          "description": "(optional) Path to the serverless app directory can be specified here. Normally it's derived from app directory and app name."
        },
        "sls_node_modules_cache_mount": {
          "type": "string",
          "description": "(optional) SLS node_modules cache mount path can be specified here. It's used to store cache during CI/CD process."
        },
        "env": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "environment"
          },
          "description": "environments"
        },
        "icon": {
          "type": "string",
          "description": "(optional) set icon"
        },
        "aws_region": {
          "type": "string",
          "description": "(optional) Serverless-specific AWS Region of this environment should be specified here. Normally global AWS_REGION is used."
        },
        "aws_profile": {
          "type": "string",
          "description": "(optional) Serverless-specific AWS profile (optional) can be specified here (but normally it should be inherited from a global AWS_PROFILE)."
        },
        "depends_on": {
          "type": "array",
          "description": "(optional) expresses startup and shutdown dependencies between apps"
        }
      },
      "additionalProperties": false
    },
    "alias": {
      "description": "Alias configuration.",
      "type": "object",
      "properties": {
        "icon": {
          "type": "string",
          "description": "(optional) set icon"
        },
        "depends_on": {
          "type": "array",
          "description": "(optional) expresses startup and shutdown dependencies between apps"
        }
      },
      "additionalProperties": false
    },
    "terraform": {
      "description": "Terraform configuration",
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "(optional) Terraform version can be set here. 1.1.3 by default."
        },
        "state_bucket_region": {
          "type": "string",
          "description": "(optional) Terraform state bucket region can be specified here. Normally AWS_REGION is used here. Can be overridden via env vars or flags."
        },
        "state_bucket_name": {
          "type": "string",
          "description": "(optional) Terraform state bucket name can be specified here. Normally it's generated and defaults to <NAMESPACE>-tf-state"
        },
        "state_name": {
          "type": "string",
          "description": "(optional) Terraform state name that will be used in the .tfstate file. Normally it's 'terraform' or state name."
        },
        "root_domain_name": {
          "type": "string",
          "description": "(optional) Root domain name can be set here. This is the main domain that will be passed to the terraform. Generally if your app lives at 'api.dev.nutcorp.net' the root domain is `nutcorp.net`"
        },
        "aws_region": {
          "type": "string",
          "description": "(optional) Terraform-specific AWS Region of this environment should be specified here. Normally global AWS_REGION is used."
        },
        "aws_profile": {
          "type": "string",
          "description": "(optional) Terraform-specific AWS profile (optional) can be specified here (but normally it should be inherited from a global AWS_PROFILE)."
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "env",
    "aws_profile",
    "aws_region",
    "namespace",
    "env_dir",
    "home",
    "ize_dir",
    "prefer_runtime",
    "root_dir"
  ],
  "additionalProperties": false
}
