Error creating Security Group: InvalidVpcID.NotFound

I am using Terraform to set up Nomad. The terraform file has these clauses:

provider "aws" {
  region = "us-west-2"

module "nomad_clients" {
  source = "git::"

  # Number of nomad clients to run
  nodes = 4
  subnet = "<redacted>"
  vpc_id = "vpc-90d180e9"

  server_endpoint = "<redacted>"

  dns_server = "<redacted>"
  blocked_cidrs = [

But when I run terraform apply, I get this error:

module.nomad_clients.aws_security_group.nomad_sg: Creating...
│ Error: Error creating Security Group: InvalidVpcID.NotFound: The vpc ID 'vpc-90d180e9' does not exist
│ 	status code: 400, request id: e8101285-ece9-49db-9f5c-b421f2a4f2d4
│   with module.nomad_clients.aws_security_group.nomad_sg,
│   on .terraform/modules/nomad_clients/nomad-aws/ line 1, in resource "aws_security_group" "nomad_sg":
│    1: resource "aws_security_group" "nomad_sg" {

The VPC does in fact exist in us-west-2, so why doesn’t terraform find it?

Also, on an earlier attempt to install, this worked. I had to uninstall for various reasons, but now on trying to re-install again, I get this error.