driftctl/pkg/resource/aws/aws_security_group.go

19 lines
698 B
Go
Raw Normal View History

package aws
2021-12-06 13:29:39 +00:00
import "github.com/snyk/driftctl/pkg/resource"
2021-03-25 11:13:52 +00:00
const AwsSecurityGroupResourceType = "aws_security_group"
2021-05-10 16:02:57 +00:00
func initAwsSecurityGroupMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
2021-08-09 14:03:04 +00:00
resourceSchemaRepository.SetNormalizeFunc(AwsSecurityGroupResourceType, func(res *resource.Resource) {
val := res.Attrs
2021-05-10 16:02:57 +00:00
val.SafeDelete([]string{"revoke_rules_on_delete"})
val.SafeDelete([]string{"timeouts"})
//TODO We need to find a way to warn users that some rules in their states could be unmanaged
val.SafeDelete([]string{"ingress"})
val.SafeDelete([]string{"egress"})
})
2021-09-17 15:16:06 +00:00
resourceSchemaRepository.SetFlags(AwsSecurityGroupResourceType, resource.FlagDeepMode)
2021-05-10 16:02:57 +00:00
}