driftctl/pkg/resource/google/google_compute_firewall.go

19 lines
754 B
Go
Raw Normal View History

2021-09-14 13:11:28 +00:00
package google
2021-12-06 13:29:39 +00:00
import "github.com/snyk/driftctl/pkg/resource"
2021-09-14 13:11:28 +00:00
const GoogleComputeFirewallResourceType = "google_compute_firewall"
func initGoogleComputeFirewallMetadata(resourceSchemaRepository resource.SchemaRepositoryInterface) {
resourceSchemaRepository.SetResolveReadAttributesFunc(GoogleComputeFirewallResourceType, func(res *resource.Resource) map[string]string {
return map[string]string{
"name": *res.Attrs.GetString("name"),
"project": *res.Attrs.GetString("project"),
}
})
resourceSchemaRepository.SetNormalizeFunc(GoogleComputeFirewallResourceType, func(res *resource.Resource) {
res.Attrs.SafeDelete([]string{"timeouts"})
})
2021-09-17 15:16:06 +00:00
resourceSchemaRepository.SetFlags(GoogleComputeFirewallResourceType, resource.FlagDeepMode)
2021-09-14 13:11:28 +00:00
}