{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/taskcat/latest.json",
  "description": "Taskcat configuration file",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/aws-quickstart/taskcat/master/taskcat/cfg/config_schema.json",
    "sourceSha256": "bad542398cccfc5d31c3821254e0c073520c06789156b03a4e829849b494a2d0",
    "fileMatch": [
      ".taskcat.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "general": {
      "$ref": "#/$defs/GeneralConfig",
      "default": {
        "artifact_regions": null,
        "auth": null,
        "parameters": null,
        "posthooks": null,
        "prehooks": null,
        "regions": null,
        "s3_bucket": null,
        "s3_regional_buckets": null,
        "tags": null
      }
    },
    "project": {
      "$ref": "#/$defs/ProjectConfig",
      "default": {
        "artifact_regions": null,
        "auth": null,
        "az_blacklist": null,
        "build_submodules": null,
        "lambda_source_path": null,
        "lambda_zip_path": null,
        "name": null,
        "org_id": null,
        "owner": null,
        "package_lambda": null,
        "parameters": null,
        "posthooks": null,
        "prehooks": null,
        "regions": null,
        "role_name": null,
        "s3_bucket": null,
        "s3_enable_sig_v2": null,
        "s3_object_acl": "private",
        "s3_regional_buckets": null,
        "shorten_stack_name": null,
        "tags": null,
        "template": null
      }
    },
    "tests": {
      "type": "object",
      "default": {},
      "additionalProperties": {
        "$ref": "#/$defs/TestConfig"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "GeneralConfig": {
      "type": "object",
      "description": "General configuration settings.",
      "properties": {
        "artifact_regions": {
          "description": "List of AWS regions where artifacts need to be copied. This helps same region artifact bucket access to resources",
          "items": {
            "description": "AWS Region name",
            "examples": [
              "us-east-1"
            ],
            "pattern": "^(ap|eu|us|sa|ca|cn|af|me|il|mx|us-gov|us-iso|us-isob|eu-isoe|us-isof|eusc)-([a-z]+-)?(central|south|north|east|west|southeast|southwest|northeast|northwest)-[0-9]$",
            "type": "string"
          },
          "type": "array"
        },
        "auth": {
          "type": "object",
          "description": "AWS authentication section",
          "examples": [
            {
              "cn-northwest-1": "china-profile",
              "default": "my-default-profile",
              "us-east-2": "specific-profile-for-us-east-2"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "parameters": {
          "type": "object",
          "description": "Parameter key-values to pass to CloudFormation, parameters provided in global config take precedence",
          "additionalProperties": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "posthooks": {
          "description": "hooks to execute after executing tests",
          "items": {
            "$ref": "#/$defs/HookData"
          },
          "type": "array"
        },
        "prehooks": {
          "description": "hooks to execute prior to executing tests",
          "items": {
            "$ref": "#/$defs/HookData"
          },
          "type": "array"
        },
        "regions": {
          "description": "List of AWS regions",
          "items": {
            "description": "AWS Region name",
            "examples": [
              "us-east-1"
            ],
            "pattern": "^(ap|eu|us|sa|ca|cn|af|me|il|mx|us-gov|us-iso|us-isob|eu-isoe|us-isof|eusc)-([a-z]+-)?(central|south|north|east|west|southeast|southwest|northeast|northwest)-[0-9]$",
            "type": "string"
          },
          "type": "array"
        },
        "s3_bucket": {
          "description": "Name of S3 bucket to upload project to, if left out a bucket will be auto-generated",
          "examples": [
            "my-s3-bucket-name"
          ],
          "type": "string"
        },
        "s3_regional_buckets": {
          "description": "Enable regional auto-buckets.",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "tags": {
          "type": "object",
          "description": "Tags to apply to CloudFormation template",
          "examples": [
            {
              "CostCenter": "1001"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "HookData": {
      "type": "object",
      "description": "Hook definition",
      "properties": {
        "config": {
          "description": "hook configuration",
          "type": "object"
        },
        "type": {
          "description": "hook type",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ProjectConfig": {
      "type": "object",
      "description": "Project specific configuration section",
      "properties": {
        "artifact_regions": {
          "description": "List of AWS regions where artifacts need to be copied. This helps same region artifact bucket access to resources",
          "items": {
            "description": "AWS Region name",
            "examples": [
              "us-east-1"
            ],
            "pattern": "^(ap|eu|us|sa|ca|cn|af|me|il|mx|us-gov|us-iso|us-isob|eu-isoe|us-isof|eusc)-([a-z]+-)?(central|south|north|east|west|southeast|southwest|northeast|northwest)-[0-9]$",
            "type": "string"
          },
          "type": "array"
        },
        "auth": {
          "type": "object",
          "description": "AWS authentication section",
          "examples": [
            {
              "cn-northwest-1": "china-profile",
              "default": "my-default-profile",
              "us-east-2": "specific-profile-for-us-east-2"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "az_blacklist": {
          "description": "List of Availablilty Zones ID's to exclude when generating availability zones",
          "items": {
            "description": "Availability Zone ID, eg.: 'use1-az1'",
            "examples": [
              "usw2-laz1-az1",
              "use2-az2"
            ],
            "pattern": "(afs1-az1|afs1-az2|afs1-az3|afs1-los1-az1|ape1-az1|ape1-az2|ape1-az3|ape2-az1|ape2-az2|ape2-az3|apne1-az1|apne1-az2|apne1-az4|apne1-tpe1-az1|apne2-az1|apne2-az2|apne2-az3|apne2-az4|apne3-az1|apne3-az2|apne3-az3|aps1-az1|aps1-az2|aps1-az3|aps1-ccu1-az1|aps1-del1-az1|aps2-az1|aps2-az2|aps2-az3|apse1-az1|apse1-az2|apse1-az3|apse1-mnl1-az1|apse2-akl1-az1|apse2-az1|apse2-az2|apse2-az3|apse2-per1-az1|apse3-az1|apse3-az2|apse3-az3|apse4-az1|apse4-az2|apse4-az3|apse5-az1|apse5-az2|apse5-az3|apse6-az1|apse6-az2|apse6-az3|apse7-az1|apse7-az2|apse7-az3|cac1-az1|cac1-az2|cac1-az4|caw1-az1|caw1-az2|caw1-az3|euc1-az1|euc1-az2|euc1-az3|euc1-ham1-az1|euc1-waw1-az1|euc2-az1|euc2-az2|euc2-az3|eun1-az1|eun1-az2|eun1-az3|eun1-cph1-az1|eun1-hel1-az1|eus1-az1|eus1-az2|eus1-az3|eus2-az1|eus2-az2|eus2-az3|euw1-az1|euw1-az2|euw1-az3|euw2-az1|euw2-az2|euw2-az3|euw3-az1|euw3-az2|euw3-az3|ilc1-az1|ilc1-az2|ilc1-az3|mec1-az1|mec1-az2|mec1-az3|mes1-az1|mes1-az2|mes1-az3|mes1-mct1-az1|mxc1-az1|mxc1-az2|mxc1-az3|sae1-az1|sae1-az2|sae1-az3|use1-atl2-az1|use1-az1|use1-az2|use1-az3|use1-az4|use1-az5|use1-az6|use1-bos1-az1|use1-bue1-az1|use1-chi2-az1|use1-dfw2-az1|use1-iah2-az1|use1-lim1-az1|use1-mci1-az1|use1-mia2-az1|use1-msp1-az1|use1-nyc2-az1|use1-phl1-az1|use1-scl1-az1|use2-az1|use2-az2|use2-az3|usw1-az1|usw1-az3|usw2-az1|usw2-az2|usw2-az3|usw2-az4|usw2-den1-az1|usw2-hnl1-az1|usw2-las1-az1|usw2-lax1-az1|usw2-lax1-az2|usw2-pdx1-az1|usw2-phx2-az1|usw2-sea1-az1)",
            "type": "string"
          },
          "type": "array"
        },
        "build_submodules": {
          "description": "Build Lambda zips recursively for submodules, set to false to disable",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "lambda_source_path": {
          "description": "Path relative to the project root containing Lambda zip files, default is 'lambda_functions/source'",
          "examples": [
            "functions/source"
          ],
          "type": "string"
        },
        "lambda_zip_path": {
          "description": "Path relative to the project root to place Lambda zip files",
          "examples": [
            "functions/packages"
          ],
          "type": "string"
        },
        "name": {
          "description": "Project name, used as s3 key prefix when uploading objects",
          "examples": [
            "my-project-name"
          ],
          "pattern": "^[a-z0-9-/]*$",
          "type": "string"
        },
        "org_id": {
          "description": "Organization ID to use when launching CFN Stacks. starts with o-. It is found on Organization Settings page",
          "type": "string"
        },
        "owner": {
          "description": "email address for project owner (not used at present)",
          "examples": [
            "Bob.Slydell@example.com"
          ],
          "type": "string"
        },
        "package_lambda": {
          "description": "Package Lambda functions into zips before uploading to s3, set to false to disable",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "parameters": {
          "type": "object",
          "description": "Parameter key-values to pass to CloudFormation, parameters provided in global config take precedence",
          "additionalProperties": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "posthooks": {
          "description": "hooks to execute after executing tests",
          "items": {
            "$ref": "#/$defs/HookData"
          },
          "type": "array"
        },
        "prehooks": {
          "description": "hooks to execute prior to executing tests",
          "items": {
            "$ref": "#/$defs/HookData"
          },
          "type": "array"
        },
        "regions": {
          "description": "List of AWS regions",
          "items": {
            "description": "AWS Region name",
            "examples": [
              "us-east-1"
            ],
            "pattern": "^(ap|eu|us|sa|ca|cn|af|me|il|mx|us-gov|us-iso|us-isob|eu-isoe|us-isof|eusc)-([a-z]+-)?(central|south|north|east|west|southeast|southwest|northeast|northwest)-[0-9]$",
            "type": "string"
          },
          "type": "array"
        },
        "role_name": {
          "description": "Role name to use when launching CFN Stacks.",
          "type": "string"
        },
        "s3_bucket": {
          "description": "Name of S3 bucket to upload project to, if left out a bucket will be auto-generated",
          "examples": [
            "my-s3-bucket-name"
          ],
          "pattern": "^[a-z0-9-]*$",
          "type": "string"
        },
        "s3_enable_sig_v2": {
          "description": "Enable (deprecated) sigv2 access to auto-generated buckets",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "s3_object_acl": {
          "default": "private",
          "description": "ACL for uploaded s3 objects",
          "examples": [
            "bucket-owner-read",
            "private"
          ],
          "pattern": "^(bucket-owner-full-control|bucket-owner-read|authenticated-read|aws-exec-read|public-read-write|public-read|private)$",
          "type": "string"
        },
        "s3_regional_buckets": {
          "description": "Enable regional auto-buckets.",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "shorten_stack_name": {
          "description": "Shorten stack names generated for tests, set to true to enable",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "tags": {
          "type": "object",
          "description": "Tags to apply to CloudFormation template",
          "examples": [
            {
              "CostCenter": "1001"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "template": {
          "description": "path to template file relative to the project config file path",
          "examples": [
            "cloudformation_templates/"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TestConfig": {
      "type": "object",
      "description": "Test specific configuration section.",
      "properties": {
        "artifact_regions": {
          "description": "List of AWS regions where artifacts need to be copied. This helps same region artifact bucket access to resources",
          "items": {
            "description": "AWS Region name",
            "examples": [
              "us-east-1"
            ],
            "pattern": "^(ap|eu|us|sa|ca|cn|af|me|il|mx|us-gov|us-iso|us-isob|eu-isoe|us-isof|eusc)-([a-z]+-)?(central|south|north|east|west|southeast|southwest|northeast|northwest)-[0-9]$",
            "type": "string"
          },
          "type": "array"
        },
        "auth": {
          "type": "object",
          "description": "AWS authentication section",
          "examples": [
            {
              "cn-northwest-1": "china-profile",
              "default": "my-default-profile",
              "us-east-2": "specific-profile-for-us-east-2"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "az_blacklist": {
          "description": "List of Availablilty Zones ID's to exclude when generating availability zones",
          "items": {
            "description": "Availability Zone ID, eg.: 'use1-az1'",
            "examples": [
              "usw2-laz1-az1",
              "use2-az2"
            ],
            "pattern": "(afs1-az1|afs1-az2|afs1-az3|afs1-los1-az1|ape1-az1|ape1-az2|ape1-az3|ape2-az1|ape2-az2|ape2-az3|apne1-az1|apne1-az2|apne1-az4|apne1-tpe1-az1|apne2-az1|apne2-az2|apne2-az3|apne2-az4|apne3-az1|apne3-az2|apne3-az3|aps1-az1|aps1-az2|aps1-az3|aps1-ccu1-az1|aps1-del1-az1|aps2-az1|aps2-az2|aps2-az3|apse1-az1|apse1-az2|apse1-az3|apse1-mnl1-az1|apse2-akl1-az1|apse2-az1|apse2-az2|apse2-az3|apse2-per1-az1|apse3-az1|apse3-az2|apse3-az3|apse4-az1|apse4-az2|apse4-az3|apse5-az1|apse5-az2|apse5-az3|apse6-az1|apse6-az2|apse6-az3|apse7-az1|apse7-az2|apse7-az3|cac1-az1|cac1-az2|cac1-az4|caw1-az1|caw1-az2|caw1-az3|euc1-az1|euc1-az2|euc1-az3|euc1-ham1-az1|euc1-waw1-az1|euc2-az1|euc2-az2|euc2-az3|eun1-az1|eun1-az2|eun1-az3|eun1-cph1-az1|eun1-hel1-az1|eus1-az1|eus1-az2|eus1-az3|eus2-az1|eus2-az2|eus2-az3|euw1-az1|euw1-az2|euw1-az3|euw2-az1|euw2-az2|euw2-az3|euw3-az1|euw3-az2|euw3-az3|ilc1-az1|ilc1-az2|ilc1-az3|mec1-az1|mec1-az2|mec1-az3|mes1-az1|mes1-az2|mes1-az3|mes1-mct1-az1|mxc1-az1|mxc1-az2|mxc1-az3|sae1-az1|sae1-az2|sae1-az3|use1-atl2-az1|use1-az1|use1-az2|use1-az3|use1-az4|use1-az5|use1-az6|use1-bos1-az1|use1-bue1-az1|use1-chi2-az1|use1-dfw2-az1|use1-iah2-az1|use1-lim1-az1|use1-mci1-az1|use1-mia2-az1|use1-msp1-az1|use1-nyc2-az1|use1-phl1-az1|use1-scl1-az1|use2-az1|use2-az2|use2-az3|usw1-az1|usw1-az3|usw2-az1|usw2-az2|usw2-az3|usw2-az4|usw2-den1-az1|usw2-hnl1-az1|usw2-las1-az1|usw2-lax1-az1|usw2-lax1-az2|usw2-pdx1-az1|usw2-phx2-az1|usw2-sea1-az1)",
            "type": "string"
          },
          "type": "array"
        },
        "parameters": {
          "type": "object",
          "default": {},
          "description": "Parameter key-values to pass to CloudFormation, parameters provided in global config take precedence",
          "additionalProperties": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "posthooks": {
          "description": "hooks to execute after executing tests",
          "items": {
            "$ref": "#/$defs/HookData"
          },
          "type": "array"
        },
        "prehooks": {
          "description": "hooks to execute prior to executing tests",
          "items": {
            "$ref": "#/$defs/HookData"
          },
          "type": "array"
        },
        "regions": {
          "description": "List of AWS regions",
          "items": {
            "description": "AWS Region name",
            "examples": [
              "us-east-1"
            ],
            "pattern": "^(ap|eu|us|sa|ca|cn|af|me|il|mx|us-gov|us-iso|us-isob|eu-isoe|us-isof|eusc)-([a-z]+-)?(central|south|north|east|west|southeast|southwest|northeast|northwest)-[0-9]$",
            "type": "string"
          },
          "type": "array"
        },
        "role_name": {
          "description": "Role name to use when launching CFN Stacks.",
          "type": "string"
        },
        "s3_bucket": {
          "description": "Name of S3 bucket to upload project to, if left out a bucket will be auto-generated",
          "examples": [
            "my-s3-bucket-name"
          ],
          "pattern": "^[a-z0-9-]*$",
          "type": "string"
        },
        "s3_regional_buckets": {
          "description": "Enable regional auto-buckets.",
          "examples": [
            true,
            false
          ],
          "type": "boolean"
        },
        "stack_name": {
          "description": "Cloudformation Stack Name",
          "type": "string"
        },
        "stack_name_prefix": {
          "description": "Prefix to apply to generated CFN Stack Name",
          "type": "string"
        },
        "stack_name_suffix": {
          "description": "Suffix to apply to generated CFN Stack Name",
          "type": "string"
        },
        "tags": {
          "type": "object",
          "description": "Tags to apply to CloudFormation template",
          "examples": [
            {
              "CostCenter": "1001"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "template": {
          "description": "path to template file relative to the project config file path",
          "examples": [
            "cloudformation_templates/"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}
