#!/usr/bin/env bash

set -x
set -euo pipefail

ROOT=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)

aws cloudformation validate-template --template-body file://$ROOT/aws/cloudformation/iam.yaml
aws cloudformation validate-template --template-body file://$ROOT/aws/cloudformation/iam-dataplane.yaml
aws cloudformation validate-template --template-body file://$ROOT/aws/cloudformation/nodegroup-control.yaml
aws cloudformation validate-template --template-body file://$ROOT/aws/cloudformation/nodegroup-data.yaml
aws cloudformation validate-template --template-body file://$ROOT/aws/cloudformation/ingress.yaml
aws cloudformation validate-template --template-body file://$ROOT/aws/cloudformation/vpc-endpoint-service.yaml
