Not able to create the AWS resources

Hi,
I am using the below configuration, to create the was resources. But I see, except instance, all the other resources, such as VPC, Subnet are not getting created. Can anybody, let me know, what’s the issue in the below configuration.

terraform {
required_providers {
aws = {
source = “hashicorp/aws”
version = “3.70.0”
}
}
}

provider “aws” {
region = “us-east-2”
access_key = “#######”
secret_key = “#########”
# Configuration options
}

resource “aws_vpc” “myvpc” {
cidr_block = “10.0.0.0/16”
instance_tenancy = “default”
}

resource “aws_subnet” “pubilcsubnet” {
vpc_id = aws_vpc.myvpc.id
cidr_block = “10.0.1.0/24”
availability_zone = “us-east-2”
}

resource “aws_instance” “sweb” {
ami = “ami-002068ed284fb165b”
instance_type = “t2.micro”
associate_public_ip_address = true
network_interface {
network_interface_id = aws_network_interface.snetworkinterface.id
device_index = 0
}
}

resource “aws_network_interface” “snetworkinterface” {
subnet_id = aws_subnet.pubilcsubnet.id
private_ips = [“10.0.0.50”]

security_groups = [aws_security_group.web.id]

}

I found the issue. It’s good now

The region should be as below for subnet:
availability_zone = “us-east-2a”

But actually, I was expecting that the terraform validate should thrown the exception as invalid region (or) something meaningful.