I was previous using Tokyo as my first region, and I’m encountering a problem when I am working with new region (sa-east-1
)
Although I have my VPC in sa-east-1, Terraform apply gives an error Error creating Security Group: InvalidVpcID.NotFound: The vpc ID 'vpc-HASH' does not exist
. I checked I have the vpc in sa-east-1
, but have no idea why Terraform is unable to find the vpc.
resource "aws_security_group" "common_eks_sg" {
name = "common-eks-sg"
description = "Every EKS node is attached to this security group."
vpc_id = "vpc-HASH"
tags = merge(local.common_tags, {
Name = "common-eks-sg"
})
}
I also tried setting the region inside ~/.aws/config
as sa-east-1, but resulted in no luck. Any suggestions or help?