-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 crashed on apply #5310
Comments
@pbitty - please can you post your terraform config (without secrets) so we can try and look at this. Also, were you trying to change infra or was this an initial creation? |
Relevant log lines:
Indicates crash was here: https://github.com/hashicorp/terraform/blob/master/builtin/providers/aws/resource_aws_security_group_rule.go#L218 Looks like a pre-0.6.12 build is running but I'm not sure the code has changed much since then. |
I'm running version Terraform v0.6.11. The crash happens on initial creation. If I re-run, I get these errors:
|
The config is somewhat large. I'm trying to reduce it to just the parts that make it crash. Would that help or do you prefer to see the whole thing? |
I've boiled it down to this config: resource "aws_security_group" "alpha" {
name = "terraform-test-alpha"
description = "Terraform Test"
}
resource "aws_security_group_rule" "alpha_self" {
type = "ingress"
from_port = 0
to_port = 65535
protocol = "tcp"
security_group_id = "${aws_security_group.alpha.id}"
self = true
} Here's another gist with crash.log and some command output. |
I'm getting a different error (not a crash) when trying to allow traffic from one SG to another:
In this case, I'm not using the |
This seems to only happen in EC2-Classic. If I add a |
I just tried the same 'self-referencing SG' config with 0.6.12 and the same thing happens. |
Thanks for the detailed repro @pbitty. I can see the issue now on one of our accounts with EC2 classic enabled, and will get it fixed! |
Sure! I can test tomorrow morning. Thanks for looking at it so quickly. |
@jen20 I just tested this and it works as expected. Thanks again. |
This commit uses Group Name in preference to Group ID where appropriate in the aws_security_group_rule resource. This fixes the crash reported in hashicorp#5310. Fixes hashicorp#5310.
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 was trying to apply changes to AWS resources (primarily security groups) and Terraform crashed. Here's a gist of crash.log.
I hope this helps. If there's anything else I can answer, let me know.
The text was updated successfully, but these errors were encountered: