---
checks:
  - code: TAG_custom
    description: Custom check to ensure the Environment tag is applied
    errorMessage: The required Environment tag was missing or invalid
    matchSpec:
      action: contains
      name: tags
      value: 
        Environment:
          action: isAny
          value: 
            - production
            - test
            - dev
            - staging
          
    requiredTypes:
    - resource
    severity: HIGH
    requiredLabels:
    - aws_lb
  - code: TAG_Environment
    description: Custom check to ensure the Environment tag is applied
    errorMessage: The required Environment tag was missing
    matchSpec:
      action: contains
      name: tags
      value:
        Environment:
          action: isAny
          value:
            - production
            - test
            - development
    requiredTypes:
    - resource
    severity: ERROR
    requiredLabels:
    - aws_instance
  - code: S3TAG
    description: Custom check to ensure the CostCentre tag is applied to aws_s3_bucket
    errorMessage: The required Environment tag was missing
    matchSpec:
      action: contains
      name: tags
      value:
        CostCentre:
          action: regexMatches
          value: "COST\\d{3}"
    requiredTypes:
    - resource
    severity: ERROR
    requiredLabels:
    - aws_s3_bucket