Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform script failing for EKS-With-Worker-Nodes #16

Open
AmitKulkarni9 opened this issue Sep 17, 2022 · 1 comment
Open

Terraform script failing for EKS-With-Worker-Nodes #16

AmitKulkarni9 opened this issue Sep 17, 2022 · 1 comment

Comments

@AmitKulkarni9
Copy link

I am using the script as is with all resources creating in us-east-1. The script is failing for EKS-With-Worker-Nodes with below error. Know how to resolve this ?

Error: error creating EKS Cluster (devopsthehardway-cluster): InvalidParameterException: The subnet ID 'subnet-0df1b2a9355054a37' does not exist (Service: AmazonEC2; Status Code: 400; Error Code: InvalidSubnetID.NotFound; Request ID: d74eea6b-fe44-4a72-a981-9b9dd4925902; Proxy: null)
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "942555e2-ecea-410a-af02-39fa33aefa90"
│ },
│ ClusterName: "devopsthehardway-cluster",
│ Message_: "The subnet ID 'subnet-0df1b2a9355054a37' does not exist (Service: AmazonEC2; Status Code: 400; Error Code: InvalidSubnetID.NotFound; Request ID: d74eea6b-fe44-4a72-a981-9b9dd4925902; Proxy: null)"
│ }

│ with aws_eks_cluster.devopsthehardway-eks,
│ on main.tf line 49, in resource "aws_eks_cluster" "devopsthehardway-eks":
│ 49: resource "aws_eks_cluster" "devopsthehardway-eks" {

@saami97
Copy link

saami97 commented Feb 11, 2025

This error occurs if your subnets are created in different region than your region defined in main.tf under:

provider "aws" {
  region = "us-east-1"  # Ensure this matches the region of your subnets
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants