{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/terrateam-config/latest.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/terrateamio/terrateam/refs/heads/main/api_schemas/terrat/config-schema.json",
    "sourceSha256": "186e5bf8c11406879a932cb567cdf68c1b136cd527e24067e47f4090ea3e3998",
    "fileMatch": [
      "**/.terrateam/config.yaml",
      "**/.terrateam/config.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "$ref": "#/$defs/version-1",
  "$defs": {
    "access-control": {
      "type": "object",
      "properties": {
        "apply_require_all_dirspace_access": {
          "default": true,
          "type": "boolean"
        },
        "ci_config_update": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "files": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/access-control-match-list"
          }
        },
        "plan_require_all_dirspace_access": {
          "default": false,
          "type": "boolean"
        },
        "policies": {
          "items": {
            "$ref": "#/$defs/access-control-policy"
          },
          "type": "array"
        },
        "terrateam_config_update": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "unlock": {
          "$ref": "#/$defs/access-control-match-list"
        }
      },
      "additionalProperties": false
    },
    "access-control-match-list": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "access-control-policy": {
      "type": "object",
      "properties": {
        "apply": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "apply_autoapprove": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "apply_force": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "apply_with_superapproval": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "plan": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "superapproval": {
          "$ref": "#/$defs/access-control-match-list"
        },
        "tag_query": {
          "type": "string"
        }
      },
      "required": [
        "tag_query"
      ],
      "additionalProperties": false
    },
    "apply-requirements": {
      "type": "object",
      "properties": {
        "checks": {
          "$ref": "#/$defs/apply-requirements-checks"
        },
        "create_completed_apply_check_on_noop": {
          "default": false,
          "type": "boolean"
        },
        "create_pending_apply_check": {
          "default": true,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "apply-requirements-checks": {
      "oneOf": [
        {
          "$ref": "#/$defs/apply-requirements-checks-1"
        },
        {
          "$ref": "#/$defs/apply-requirements-checks-2"
        }
      ]
    },
    "apply-requirements-checks-1": {
      "type": "object",
      "properties": {
        "approved": {
          "$ref": "#/$defs/apply-requirements-checks-approved"
        },
        "merge_conflicts": {
          "$ref": "#/$defs/apply-requirements-checks-merge-conflicts"
        },
        "status_checks": {
          "$ref": "#/$defs/apply-requirements-checks-status-checks"
        }
      },
      "additionalProperties": false
    },
    "apply-requirements-checks-2": {
      "items": {
        "type": "object",
        "properties": {
          "apply_after_merge": {
            "$ref": "#/$defs/apply-requirements-checks-apply-after-merge"
          },
          "approved": {
            "$ref": "#/$defs/apply-requirements-checks-approved-2"
          },
          "merge_conflicts": {
            "$ref": "#/$defs/apply-requirements-checks-merge-conflicts"
          },
          "require_ready_for_review_pr": {
            "default": true,
            "type": "boolean"
          },
          "status_checks": {
            "$ref": "#/$defs/apply-requirements-checks-status-checks"
          },
          "tag_query": {
            "type": "string"
          }
        },
        "required": [
          "tag_query"
        ],
        "additionalProperties": false
      },
      "type": "array"
    },
    "apply-requirements-checks-apply-after-merge": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "apply-requirements-checks-approved": {
      "oneOf": [
        {
          "$ref": "#/$defs/apply-requirements-checks-approved-1"
        },
        {
          "$ref": "#/$defs/apply-requirements-checks-approved-2"
        }
      ]
    },
    "apply-requirements-checks-approved-1": {
      "type": "object",
      "properties": {
        "count": {
          "default": 1,
          "type": "integer"
        },
        "enabled": {
          "default": false,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "apply-requirements-checks-approved-2": {
      "type": "object",
      "properties": {
        "all_of": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "any_of": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "any_of_count": {
          "default": 1,
          "type": "integer"
        },
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "require_completed_reviews": {
          "default": false,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "apply-requirements-checks-merge-conflicts": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "apply-requirements-checks-status-checks": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "ignore_matching": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "automerge": {
      "type": "object",
      "properties": {
        "delete_branch": {
          "default": false,
          "type": "boolean"
        },
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "merge_strategy": {
          "default": "auto",
          "enum": [
            "auto",
            "merge",
            "rebase",
            "squash"
          ],
          "type": "string"
        },
        "require_explicit_apply": {
          "default": false,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "batch-runs": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "max_workspaces_per_batch": {
          "default": 1,
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "config-builder": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "script": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "custom-tags": {
      "type": "object",
      "properties": {
        "branch": {
          "$ref": "#/$defs/custom-tags-branch"
        },
        "dest_branch": {
          "$ref": "#/$defs/custom-tags-branch"
        }
      },
      "additionalProperties": false
    },
    "custom-tags-branch": {
      "type": "object",
      "properties": {},
      "additionalProperties": {
        "type": "string"
      }
    },
    "default-branch-overrides": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "destination-branch-name": {
      "type": "string"
    },
    "destination-branch-object": {
      "type": "object",
      "properties": {
        "branch": {
          "type": "string"
        },
        "source_branches": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "branch"
      ],
      "additionalProperties": false
    },
    "dir": {
      "type": "object",
      "properties": {
        "create_and_select_workspace": {
          "default": true,
          "type": "boolean"
        },
        "create_if_missing": {
          "default": false,
          "type": "boolean"
        },
        "lock_branch_target": {
          "enum": [
            "all",
            "dest_branch"
          ],
          "type": "string"
        },
        "stacks": {
          "$ref": "#/$defs/workspaces"
        },
        "tags": {
          "$ref": "#/$defs/tags"
        },
        "when_modified": {
          "$ref": "#/$defs/when-modified-nullable"
        },
        "workspaces": {
          "$ref": "#/$defs/workspaces"
        }
      },
      "additionalProperties": false
    },
    "drift-1": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "reconcile": {
          "default": false,
          "type": "boolean"
        },
        "schedule": {
          "enum": [
            "hourly",
            "daily",
            "weekly",
            "monthly"
          ],
          "type": "string"
        },
        "tag_query": {
          "type": "string"
        }
      },
      "required": [
        "schedule"
      ],
      "additionalProperties": false
    },
    "drift-2": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "schedules": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/drift-schedule"
          }
        }
      },
      "required": [
        "schedules"
      ],
      "additionalProperties": false
    },
    "drift-schedule": {
      "type": "object",
      "properties": {
        "reconcile": {
          "default": false,
          "type": "boolean"
        },
        "schedule": {
          "enum": [
            "hourly",
            "daily",
            "weekly",
            "monthly"
          ],
          "type": "string"
        },
        "tag_query": {
          "type": "string"
        },
        "window": {
          "type": "object",
          "properties": {
            "end": {
              "type": "string"
            },
            "start": {
              "type": "string"
            }
          },
          "required": [
            "end",
            "start"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "schedule",
        "tag_query"
      ],
      "additionalProperties": false
    },
    "engine": {
      "anyOf": [
        {
          "$ref": "#/$defs/engine-cdktf"
        },
        {
          "$ref": "#/$defs/engine-opentofu"
        },
        {
          "$ref": "#/$defs/engine-terraform"
        },
        {
          "$ref": "#/$defs/engine-terragrunt"
        },
        {
          "$ref": "#/$defs/engine-pulumi"
        },
        {
          "$ref": "#/$defs/engine-fly"
        },
        {
          "$ref": "#/$defs/engine-custom"
        },
        {
          "$ref": "#/$defs/engine-other"
        }
      ]
    },
    "engine-cdktf": {
      "type": "object",
      "properties": {
        "name": {
          "const": "cdktf",
          "type": "string"
        },
        "outputs": {
          "$ref": "#/$defs/engine-tf-outputs"
        },
        "override_tf_cmd": {
          "type": "string"
        },
        "tf_cmd": {
          "type": "string"
        },
        "tf_version": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "engine-custom": {
      "type": "object",
      "properties": {
        "apply": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "diff": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "init": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "name": {
          "const": "custom",
          "type": "string"
        },
        "outputs": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "plan": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "unsafe_apply": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "engine-fly": {
      "type": "object",
      "properties": {
        "config_file": {
          "type": "string"
        },
        "name": {
          "const": "fly",
          "type": "string"
        }
      },
      "required": [
        "config_file",
        "name"
      ],
      "additionalProperties": false
    },
    "engine-opentofu": {
      "type": "object",
      "properties": {
        "name": {
          "const": "tofu",
          "type": "string"
        },
        "outputs": {
          "$ref": "#/$defs/engine-tf-outputs"
        },
        "override_tf_cmd": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "engine-other": {
      "type": "object",
      "properties": {},
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ]
      }
    },
    "engine-pulumi": {
      "type": "object",
      "properties": {
        "name": {
          "const": "pulumi",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "engine-terraform": {
      "type": "object",
      "properties": {
        "name": {
          "const": "terraform",
          "type": "string"
        },
        "outputs": {
          "$ref": "#/$defs/engine-tf-outputs"
        },
        "override_tf_cmd": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "engine-terragrunt": {
      "type": "object",
      "properties": {
        "name": {
          "const": "terragrunt",
          "type": "string"
        },
        "outputs": {
          "$ref": "#/$defs/engine-tf-outputs"
        },
        "override_tf_cmd": {
          "type": "string"
        },
        "tf_cmd": {
          "type": "string"
        },
        "tf_version": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "engine-tf-outputs": {
      "type": "object",
      "properties": {
        "collect": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "gate": {
      "type": "object",
      "properties": {
        "all_of": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "any_of": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "any_of_count": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "hook": {
      "type": "object",
      "properties": {
        "post": {
          "$ref": "#/$defs/hook-list"
        },
        "pre": {
          "$ref": "#/$defs/hook-list"
        }
      },
      "additionalProperties": false
    },
    "hook-list": {
      "items": {
        "$ref": "#/$defs/hook-op"
      },
      "type": "array"
    },
    "hook-op": {
      "oneOf": [
        {
          "$ref": "#/$defs/hook-op-drift-create-issue"
        },
        {
          "$ref": "#/$defs/hook-op-env-exec"
        },
        {
          "$ref": "#/$defs/hook-op-env-source"
        },
        {
          "$ref": "#/$defs/hook-op-oidc"
        },
        {
          "$ref": "#/$defs/hook-op-run"
        },
        {
          "$ref": "#/$defs/hook-op-slack"
        },
        {
          "$ref": "#/$defs/hook-op-gates"
        }
      ]
    },
    "hook-op-drift-create-issue": {
      "type": "object",
      "properties": {
        "type": {
          "const": "drift_create_issue",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "hook-op-env-exec": {
      "type": "object",
      "properties": {
        "cmd": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "method": {
          "const": "exec",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "sensitive": {
          "default": false,
          "type": "boolean"
        },
        "trim_trailing_newlines": {
          "default": true,
          "type": "boolean"
        },
        "type": {
          "const": "env",
          "type": "string"
        }
      },
      "required": [
        "type",
        "name",
        "cmd"
      ],
      "additionalProperties": false
    },
    "hook-op-env-source": {
      "type": "object",
      "properties": {
        "cmd": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "method": {
          "const": "source",
          "type": "string"
        },
        "sensitive": {
          "default": false,
          "type": "boolean"
        },
        "type": {
          "const": "env",
          "type": "string"
        }
      },
      "required": [
        "cmd",
        "method",
        "type"
      ],
      "additionalProperties": false
    },
    "hook-op-gates": {
      "type": "object",
      "properties": {
        "cmd": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "run_on": {
          "$ref": "#/$defs/run-on"
        },
        "type": {
          "const": "gates",
          "type": "string"
        }
      },
      "required": [
        "cmd",
        "type"
      ],
      "additionalProperties": false
    },
    "hook-op-oidc": {
      "oneOf": [
        {
          "$ref": "#/$defs/hook-op-oidc-aws"
        },
        {
          "$ref": "#/$defs/hook-op-oidc-gcp"
        }
      ]
    },
    "hook-op-oidc-aws": {
      "type": "object",
      "properties": {
        "assume_role_arn": {
          "type": "string"
        },
        "assume_role_enabled": {
          "default": true,
          "type": "boolean"
        },
        "audience": {
          "type": "string"
        },
        "duration": {
          "default": 3600,
          "type": "integer"
        },
        "provider": {
          "const": "aws",
          "type": "string"
        },
        "region": {
          "default": "us-east-1",
          "type": "string"
        },
        "role_arn": {
          "type": "string"
        },
        "session_name": {
          "default": "terrateam",
          "type": "string"
        },
        "type": {
          "const": "oidc",
          "type": "string"
        }
      },
      "required": [
        "role_arn",
        "type"
      ],
      "additionalProperties": false
    },
    "hook-op-oidc-gcp": {
      "required": [
        "provider",
        "service_account",
        "type",
        "workload_identity_provider"
      ],
      "properties": {
        "access_token_lifetime": {
          "default": 3600,
          "type": "integer"
        },
        "access_token_subject": {
          "type": "string"
        },
        "audience": {
          "type": "string"
        },
        "project_id": {
          "type": "string"
        },
        "provider": {
          "const": "gcp",
          "type": "string"
        },
        "service_account": {
          "type": "string"
        },
        "type": {
          "const": "oidc",
          "type": "string"
        },
        "workload_identity_provider": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "hook-op-run": {
      "type": "object",
      "properties": {
        "capture_output": {
          "default": false,
          "type": "boolean"
        },
        "cmd": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "ignore_errors": {
          "default": false,
          "type": "boolean"
        },
        "on_error": {
          "items": {},
          "type": "array"
        },
        "run_on": {
          "$ref": "#/$defs/run-on"
        },
        "type": {
          "const": "run",
          "type": "string"
        },
        "visible_on": {
          "$ref": "#/$defs/visible-on"
        }
      },
      "required": [
        "type",
        "cmd"
      ],
      "additionalProperties": false
    },
    "hook-op-slack": {
      "type": "object",
      "properties": {
        "msg": {
          "type": "string"
        },
        "run_on": {
          "$ref": "#/$defs/run-on"
        },
        "type": {
          "const": "slack",
          "type": "string"
        }
      },
      "required": [
        "type",
        "msg"
      ],
      "additionalProperties": false
    },
    "integrations": {
      "type": "object",
      "properties": {
        "resourcely": {
          "type": "object",
          "properties": {
            "enabled": {
              "default": false,
              "type": "boolean"
            },
            "extra_args": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "enabled"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "notification-policy": {
      "type": "object",
      "properties": {
        "comment_strategy": {
          "default": "minimize",
          "enum": [
            "append",
            "delete",
            "minimize"
          ],
          "type": "string"
        },
        "tag_query": {
          "type": "string"
        }
      },
      "required": [
        "tag_query"
      ],
      "additionalProperties": false
    },
    "notifications": {
      "type": "object",
      "properties": {
        "policies": {
          "items": {
            "$ref": "#/$defs/notification-policy"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "permission": {
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "permissions": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "permissions"
        ],
        "additionalProperties": false
      },
      "type": "array"
    },
    "retry": {
      "type": "object",
      "properties": {
        "backoff": {
          "default": 1.5,
          "type": "number"
        },
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "initial_sleep": {
          "default": 5,
          "type": "integer"
        },
        "tries": {
          "default": 3,
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "run-on": {
      "enum": [
        "failure",
        "always",
        "success"
      ],
      "type": "string"
    },
    "runs-on": {},
    "stack-config": {
      "type": "object",
      "properties": {
        "rules": {
          "$ref": "#/$defs/stack-rules"
        },
        "tag_query": {
          "type": "string"
        },
        "variables": {
          "$ref": "#/$defs/stack-variables"
        }
      },
      "required": [
        "tag_query"
      ],
      "additionalProperties": false
    },
    "stack-nested-config": {
      "type": "object",
      "properties": {
        "rules": {
          "$ref": "#/$defs/stack-rules"
        },
        "stacks": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "variables": {
          "$ref": "#/$defs/stack-variables"
        }
      },
      "required": [
        "stacks"
      ],
      "additionalProperties": false
    },
    "stack-rules": {
      "type": "object",
      "properties": {
        "apply_after": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "auto_apply": {
          "type": "boolean"
        },
        "modified_by": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "plan_after": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "stack-variables": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "stacks": {
      "type": "object",
      "properties": {
        "names": {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "$ref": "#/$defs/stack-config"
              },
              {
                "$ref": "#/$defs/stack-nested-config"
              }
            ]
          }
        }
      },
      "require": [
        "names"
      ],
      "additionalProperties": false
    },
    "storage-plan-cmd": {
      "type": "object",
      "properties": {
        "delete": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "fetch": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "method": {
          "const": "cmd",
          "type": "string"
        },
        "store": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "method",
        "store",
        "fetch"
      ],
      "additionalProperties": false
    },
    "storage-plan-s3": {
      "type": "object",
      "properties": {
        "access_key_id": {
          "type": "string"
        },
        "bucket": {
          "type": "string"
        },
        "delete_extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "delete_used_plans": {
          "default": true,
          "type": "boolean"
        },
        "fetch_extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "method": {
          "const": "s3",
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "secret_access_key": {
          "type": "string"
        },
        "store_extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "bucket",
        "method",
        "region"
      ],
      "additionalProperties": false
    },
    "storage-plan-terrateam": {
      "type": "object",
      "properties": {
        "method": {
          "const": "terrateam",
          "type": "string"
        }
      },
      "required": [
        "method"
      ],
      "additionalProperties": false
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "terraform-version": {
      "type": "string"
    },
    "tree-builder": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "script": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "version-1": {
      "type": "object",
      "properties": {
        "access_control": {
          "$ref": "#/$defs/access-control"
        },
        "apply_requirements": {
          "$ref": "#/$defs/apply-requirements"
        },
        "automerge": {
          "$ref": "#/$defs/automerge"
        },
        "batch_runs": {
          "$ref": "#/$defs/batch-runs"
        },
        "checkout_strategy": {
          "default": "merge",
          "enum": [
            "merge",
            "checkout"
          ],
          "type": "string"
        },
        "config_builder": {
          "$ref": "#/$defs/config-builder"
        },
        "cost_estimation": {
          "type": "object",
          "properties": {
            "currency": {
              "default": "USD",
              "type": "string"
            },
            "enabled": {
              "default": true,
              "type": "boolean"
            },
            "provider": {
              "default": "infracost",
              "enum": [
                "infracost"
              ],
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "create_and_select_workspace": {
          "default": true,
          "type": "boolean"
        },
        "default_branch_overrides": {
          "$ref": "#/$defs/default-branch-overrides"
        },
        "default_tf_version": {
          "$ref": "#/$defs/terraform-version"
        },
        "definitions": {},
        "destination_branches": {
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/destination-branch-name"
              },
              {
                "$ref": "#/$defs/destination-branch-object"
              }
            ]
          },
          "type": "array"
        },
        "dirs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/dir"
          }
        },
        "drift": {
          "oneOf": [
            {
              "$ref": "#/$defs/drift-1"
            },
            {
              "$ref": "#/$defs/drift-2"
            }
          ]
        },
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "engine": {
          "$ref": "#/$defs/engine"
        },
        "hooks": {
          "type": "object",
          "properties": {
            "all": {
              "$ref": "#/$defs/hook"
            },
            "apply": {
              "$ref": "#/$defs/hook"
            },
            "plan": {
              "$ref": "#/$defs/hook"
            }
          },
          "additionalProperties": false
        },
        "indexer": {
          "type": "object",
          "properties": {
            "build_tag": {
              "type": "string"
            },
            "enabled": {
              "default": false,
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "integrations": {
          "$ref": "#/$defs/integrations"
        },
        "notifications": {
          "$ref": "#/$defs/notifications"
        },
        "parallel_runs": {
          "default": 3,
          "type": "integer"
        },
        "stacks": {
          "$ref": "#/$defs/stacks"
        },
        "storage": {
          "type": "object",
          "properties": {
            "plans": {
              "oneOf": [
                {
                  "$ref": "#/$defs/storage-plan-terrateam"
                },
                {
                  "$ref": "#/$defs/storage-plan-cmd"
                },
                {
                  "$ref": "#/$defs/storage-plan-s3"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "tags": {
          "$ref": "#/$defs/custom-tags"
        },
        "tree_builder": {
          "$ref": "#/$defs/tree-builder"
        },
        "version": {
          "const": "1",
          "default": "1",
          "type": "string"
        },
        "when_modified": {
          "$ref": "#/$defs/when-modified"
        },
        "workflows": {
          "items": {
            "$ref": "#/$defs/workflow-entry"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "visible-on": {
      "enum": [
        "always",
        "failure",
        "success"
      ],
      "type": "string"
    },
    "when-modified": {
      "type": "object",
      "properties": {
        "autoapply": {
          "default": false,
          "type": "boolean"
        },
        "autoplan": {
          "default": true,
          "type": "boolean"
        },
        "autoplan_draft_pr": {
          "default": true,
          "type": "boolean"
        },
        "depends_on": {
          "type": "string"
        },
        "file_patterns": {
          "default": [
            "**/*.tf",
            "**/*.tfvars"
          ],
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "when-modified-nullable": {
      "type": "object",
      "properties": {
        "autoapply": {
          "type": "boolean"
        },
        "autoplan": {
          "type": "boolean"
        },
        "autoplan_draft_pr": {
          "type": "boolean"
        },
        "depends_on": {
          "type": "string"
        },
        "file_patterns": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "workflow-entry": {
      "type": "object",
      "properties": {
        "apply": {
          "$ref": "#/$defs/workflow-op-list"
        },
        "cdktf": {
          "default": false,
          "type": "boolean"
        },
        "engine": {
          "$ref": "#/$defs/engine"
        },
        "environment": {
          "type": "string"
        },
        "integrations": {
          "$ref": "#/$defs/integrations"
        },
        "lock_policy": {
          "default": "strict",
          "enum": [
            "apply",
            "merge",
            "none",
            "strict"
          ],
          "type": "string"
        },
        "plan": {
          "$ref": "#/$defs/workflow-op-list"
        },
        "runs_on": {
          "$ref": "#/$defs/runs-on"
        },
        "tag_query": {
          "type": "string"
        },
        "terraform_version": {
          "$ref": "#/$defs/terraform-version"
        },
        "terragrunt": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "tag_query"
      ],
      "additionalProperties": false
    },
    "workflow-op-apply": {
      "type": "object",
      "properties": {
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "retry": {
          "$ref": "#/$defs/retry"
        },
        "type": {
          "const": "apply",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "workflow-op-checkov": {
      "type": "object",
      "properties": {
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "gate": {
          "$ref": "#/$defs/gate"
        },
        "ignore_errors": {
          "default": false,
          "type": "boolean"
        },
        "run_on": {
          "$ref": "#/$defs/run-on"
        },
        "type": {
          "const": "checkov",
          "type": "string"
        },
        "visible_on": {
          "$ref": "#/$defs/visible-on"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "workflow-op-conftest": {
      "type": "object",
      "properties": {
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "gate": {
          "$ref": "#/$defs/gate"
        },
        "ignore_errors": {
          "default": false,
          "type": "boolean"
        },
        "run_on": {
          "$ref": "#/$defs/run-on"
        },
        "type": {
          "const": "conftest",
          "type": "string"
        },
        "visible_on": {
          "enum": [
            "always",
            "failure",
            "success"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "workflow-op-init": {
      "type": "object",
      "properties": {
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "const": "init",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "workflow-op-list": {
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/workflow-op-init"
          },
          {
            "$ref": "#/$defs/workflow-op-plan"
          },
          {
            "$ref": "#/$defs/workflow-op-checkov"
          },
          {
            "$ref": "#/$defs/workflow-op-conftest"
          },
          {
            "$ref": "#/$defs/workflow-op-apply"
          },
          {
            "$ref": "#/$defs/workflow-op-opa"
          },
          {
            "$ref": "#/$defs/hook-op-run"
          },
          {
            "$ref": "#/$defs/hook-op-slack"
          },
          {
            "$ref": "#/$defs/hook-op-env-exec"
          },
          {
            "$ref": "#/$defs/hook-op-env-source"
          },
          {
            "$ref": "#/$defs/hook-op-oidc"
          },
          {
            "$ref": "#/$defs/hook-op-gates"
          }
        ]
      },
      "type": "array"
    },
    "workflow-op-opa": {
      "type": "object",
      "properties": {
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "fail_on": {
          "default": "undefined",
          "enum": [
            "defined",
            "undefined"
          ],
          "type": "string"
        },
        "gate": {
          "$ref": "#/$defs/gate"
        },
        "ignore_errors": {
          "default": false,
          "type": "boolean"
        },
        "run_on": {
          "$ref": "#/$defs/run-on"
        },
        "type": {
          "const": "opa",
          "type": "string"
        },
        "visible_on": {
          "$ref": "#/$defs/visible-on"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "workflow-op-plan": {
      "type": "object",
      "properties": {
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "extra_args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mode": {
          "default": "strict",
          "enum": [
            "fast-and-loose",
            "strict"
          ],
          "type": "string"
        },
        "type": {
          "const": "plan",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "workspaces": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "tags": {
            "$ref": "#/$defs/tags"
          },
          "when_modified": {
            "$ref": "#/$defs/when-modified-nullable"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
