Harry-Moore-dev / terraform-aws-beamMP-server-module

Terraform module to deploy a BeamMP server to AWS
https://registry.terraform.io/modules/Harry-Moore-dev/beamMP-server-module/aws/latest
MIT License
2 stars 0 forks source link

Issue with overlapping cidr ranges #10

Closed wesbest123 closed 10 months ago

wesbest123 commented 10 months ago

Yoooo harry im trying to deploy your template and keep getting this error message any ideas?

│ Error: creating EC2 Subnet: InvalidSubnet.Conflict: The CIDR '172.31.0.0/16' conflicts with another subnet │ status code: 400, request id: 036a8588-74b0-4bb7-a487-47fe02efcdc7 │ │ with aws_subnet.public_subnet, │ on main.tf line 12, in resource "aws_subnet" "public_subnet": │ 12: resource "aws_subnet" "public_subnet" { │

Harry-Moore-dev commented 10 months ago

Hi Wesbest,

The module deploys in the default VPC of the specified region and creates a new public subnet for the EC2 instance. This error would suggest that the 172.31.0.0/16 subnet overlaps with an existing subnet within that VPC in the selected region.

The cidr range is configurable through the variable vpc_subnet_cidr_block to override the default value. It's hard to reccommend what to set this to without knowing what other subnets are configured in your VPC, but try setting this to 172.31.64.0/16 as this should work with the default VPC configuration.