{%if public_cluster.net_config == True %}

resource "aws_subnet" "private-us-east-1a" {
    vpc_id            = aws_vpc.main.id
    cidr_block        = "10.0.0.0/19"
    availability_zone = "eu-west-1a"
  
    tags = {
      "Name"                            = "private-us-east-1a"
      "kubernetes.io/role/internal-elb" = "1"
      "kubernetes.io/cluster/{{public_cluster.name}}"      = "owned"
    }
  }
  
  resource "aws_subnet" "private-us-east-1b" {
    vpc_id            = aws_vpc.main.id
    cidr_block        = "10.0.32.0/19"
    availability_zone = "eu-west-1b"
  
    tags = {
      "Name"                            = "private-us-east-1b"
      "kubernetes.io/role/internal-elb" = "1"
      "kubernetes.io/cluster/{{public_cluster.name}}"      = "owned"
    }
  }
  
  resource "aws_subnet" "public-us-east-1a" {
    vpc_id                  = aws_vpc.main.id
    cidr_block              = "10.0.64.0/19"
    availability_zone       = "eu-west-1a"
    map_public_ip_on_launch = true
  
    tags = {
      "Name"                       = "public-us-east-1a"
      "kubernetes.io/role/elb"     = "1"
      "kubernetes.io/cluster/{{public_cluster.name}}" = "owned"
    }
  }
  
  resource "aws_subnet" "public-us-east-1b" {
    vpc_id                  = aws_vpc.main.id
    cidr_block              = "10.0.96.0/19"
    availability_zone       = "eu-west-1b"
    map_public_ip_on_launch = true
  
    tags = {
      "Name"                       = "public-us-east-1b"
      "kubernetes.io/role/elb"     = "1"
      "kubernetes.io/cluster/{{public_cluster.name}}" = "owned"
    }
  }

  {%endif%}
  