2020-12-09 15:31:34 +00:00
|
|
|
package aws
|
|
|
|
|
2022-06-28 07:23:29 +00:00
|
|
|
import (
|
|
|
|
"github.com/snyk/driftctl/enumeration/resource"
|
|
|
|
"github.com/snyk/driftctl/enumeration/resource/aws"
|
|
|
|
)
|
2020-12-09 15:31:34 +00:00
|
|
|
|
2021-05-10 16:02:57 +00:00
|
|
|
func initAwsSecurityGroupMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
|
2022-06-28 07:23:29 +00:00
|
|
|
resourceSchemaRepository.SetNormalizeFunc(aws.AwsSecurityGroupResourceType, func(res *resource.Resource) {
|
2021-05-24 15:19:06 +00:00
|
|
|
val := res.Attrs
|
2021-05-10 16:02:57 +00:00
|
|
|
val.SafeDelete([]string{"revoke_rules_on_delete"})
|
|
|
|
val.SafeDelete([]string{"timeouts"})
|
|
|
|
|
2022-06-28 07:23:29 +00:00
|
|
|
// TODO We need to find a way to warn users that some rules in their states could be unmanaged
|
2021-05-10 16:02:57 +00:00
|
|
|
val.SafeDelete([]string{"ingress"})
|
|
|
|
val.SafeDelete([]string{"egress"})
|
|
|
|
})
|
|
|
|
}
|