Open devops4me opened 5 years ago
I am seeing the same issue during an apply step:
Error: Error applying plan:
1 error(s) occurred:
* aws_default_security_group.default: 1 error(s) occurred:
* aws_default_security_group.default: Error revoking default egress rules for Default Security Group (sg-2e0f243b): InvalidPermission.NotFound: The specified rule does not exist in this security group.
status code: 400, request id: 5c5525bc-9953-462b-98af-78a1d5590122
Terraform version info:
terraform --version
Terraform v0.11.10
+ provider.aws v1.50.0
.tf configuration:
resource "aws_default_security_group" "default" {
vpc_id = "${aws_vpc.vpc.id}"
tags = {
Name = "ProjectNameHere - Default"
Client = "CompanyName"
}
ingress {
protocol = -1
self = true
from_port = 0
to_port = 0
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}
When attempting to use the VPC's default security group errors occur (sporadically as opposed to always). These errors state that permission denied because it tries to first delete rules that are present and AWS does not appear to allow this for default security groups.
Terraform AWS Security Group | InvalidPermission.NotFound Error
Error applying plan
1 error(s) occurred:
module.security-group-test-2.aws_default_security_group.default: 1 error(s) occurred:
aws_default_security_group.default: Error revoking default egress rules for Default Security Group (sg-053ec41ddf5c3137a): InvalidPermission.NotFound: The specified rule does not exist in this security group. status code: 400, request id: 8cd757d2-91d8-4ffe-9663-da108e44aaf7