When a Security Group Rule is removed/changed in AWS Console, the terraform plan should detect that and suggest recreation/modification of the removed/changed rule.
Actual Behavior
Since version 5.60, when a Security Group Rule is removed/changed in AWS Console, the terraform plan does not suggest any changes
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
provider "aws" {
region = "us-east-1"
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
#version = "5.59.0" # Still detects removed SG rule
#version = "5.60.0" # Does not detect removed SG rule
version = "5.68.0" # Does not detect removed SG rule
}
}
}
resource "aws_security_group" "test_sg" {
name = "test_sg"
}
resource "aws_security_group_rule" "test_rule" {
type = "ingress"
from_port = 443
to_port = 443
protocol = "tcp"
self = true
security_group_id = aws_security_group.test_sg.id
}
Steps to Reproduce
Create the security group and security group rule by terraform apply
Log into AWS Console and change the created rule from the created security group
Run terraform plan -> "No changes. Your infrastructure matches the configuration."
Remove the created rule from the created security group
Run terraform plan -> "No changes. Your infrastructure matches the configuration."
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.9.5
AWS Provider Version
5.60, 5.68
Affected Resource(s)
Expected Behavior
When a Security Group Rule is removed/changed in AWS Console, the terraform plan should detect that and suggest recreation/modification of the removed/changed rule.
Actual Behavior
Since version 5.60, when a Security Group Rule is removed/changed in AWS Console, the terraform plan does not suggest any changes
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None