{
  "$id": "https://niklasrosenstein.github.io/gitopsctr/schemas/apis/unit.gitopsctr.io/v1/Terraform/receipt.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },
    "apiVersion": {
      "const": "gitopsctr.io/v1"
    },
    "kind": {
      "const": "Receipt"
    },
    "metadata": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "desired": {
          "type": "object"
        },
        "resolvedInputs": {
          "additionalProperties": false,
          "properties": {
            "artifacts": {
              "anyOf": [
                {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "importedArtifactEvidence": {
              "anyOf": [
                {
                  "additionalProperties": {
                    "type": "object"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "importedArtifacts": {
              "anyOf": [
                {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "promotions": {
              "anyOf": [
                {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "receipts": {
              "anyOf": [
                {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            }
          },
          "type": "object"
        },
        "subject": {
          "additionalProperties": false,
          "properties": {
            "apiVersion": {
              "const": "unit.gitopsctr.io/v1"
            },
            "kind": {
              "const": "Terraform"
            },
            "name": {
              "minLength": 1,
              "type": "string"
            },
            "qualifiedName": {
              "pattern": "^[a-z0-9][a-z0-9-]*(?:/[a-z0-9][a-z0-9-]*)*$",
              "type": "string"
            }
          },
          "required": [
            "apiVersion",
            "kind",
            "name",
            "qualifiedName"
          ],
          "type": "object"
        }
      },
      "required": [
        "subject",
        "desired"
      ],
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "properties": {
        "controller": {
          "type": "object"
        },
        "result": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "additionalProperties": false,
              "properties": {
                "path": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "sourceRevision": {
                  "type": "string"
                }
              },
              "required": [
                "sourceRevision"
              ],
              "title": "AppliedTerraformModel",
              "type": "object"
            },
            "outputs": {
              "type": "object"
            }
          },
          "required": [
            "applied",
            "outputs"
          ],
          "type": "object"
        }
      },
      "required": [
        "controller",
        "result"
      ],
      "type": "object"
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "metadata",
    "spec",
    "status"
  ],
  "title": "Receipt for Terraform",
  "type": "object"
}
