From 54bfde8c9297ef61fcaff3641f2723a5aedf3f28 Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 13 Feb 2023 20:15:01 +0100 Subject: [PATCH] fixes issue where not having rules in binding triggeres empty request and therefore an error with platform --- anypoint/resource_ame_binding.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anypoint/resource_ame_binding.go b/anypoint/resource_ame_binding.go index c6280d2..26c418e 100644 --- a/anypoint/resource_ame_binding.go +++ b/anypoint/resource_ame_binding.go @@ -487,6 +487,10 @@ func resourceAMEBindingRulesDelete(ctx context.Context, d *schema.ResourceData, func newAMEBindingRuleBody(d *schema.ResourceData) *ame_binding.AMEBindingRuleBody { rules := extractAMEBindingRules(d) + if rules == nil { + return nil + } + body := ame_binding.NewAMEBindingRuleBody() list := make([]map[string]interface{}, len(rules))