-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
InvalidSubnet.Conflict: The CIDR 'XXX' conflicts with another subnet #7516
Comments
Definitely running into this & all the aforementioned consistency issues when running on CircleCI. I can provide log files if that's helpful. This is making terraform unusable in a CI context for us. |
Thanks @brikis98 – you don't happen to have logs around this by chance, do you? It does sound like a subnet was created, but then we mistakenly don't record it or encounter some other kind of error that prevents us from tracking it. A follow up plan/apply would then result in the duplicate. Unfortunately tracking this down requires knowing how/why it's failing to save. You don't by chance have a config that reproduces this, do you? |
@catsby I believe this was one of the many bugs that was a side-effect of #7527. Ever since I applied the workaround described in that issue, I have not seen this bug either. Therefore, I'm not sure the particular config matters (the Terraform snippet in the bug description is enough): the important thing is that you get some really crazy errors if you start adding things to a VPC before the gateways are ready. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I am creating a fairly complicated VPC setup with multiple VPCs, subnets, route tables, and network ACLs. I am intermittently seeing a number of different eventual consistency bugs, such as #7038, #5335, #5185, and #6813, most of which go away when I re-run
terraform apply
. Unfortunately, re-runningapply
seems to intermittently cause a different bug that does not go away related to some sort of subnet conflict.Terraform Version
Terraform v0.6.16
Affected Resource(s)
Terraform Configuration Files
There is a lot of Terraform code, so I'm trying to focus just on the relevant parts:
Expected Behavior
Subnets should be created without errors.
Actual Behavior
I sometimes get the following error:
Note that there are no duplicate subnets in the templates. I suspect that, given all the other intermittent errors I'm seeing, Terraform is somehow not recording correctly that it already created one of the subnets, and is trying to create it again.
The text was updated successfully, but these errors were encountered: