Skip to content

Commit c67985a

Browse files
committed
backcompat fix for route rules
1 parent 28adf9c commit c67985a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

oci/core_route_table_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func (s *CoreRouteTableResourceCrud) mapToRouteRule(fieldKeyFormat string) (oci_
372372
result.DestinationType = tmp
373373
}
374374

375-
if description, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "description")); ok {
375+
if description, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "description")); ok && description != "" {
376376
tmp := description.(string)
377377
result.Description = &tmp
378378
}

oci/core_security_list_resource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ func (s *CoreSecurityListResourceCrud) SetData() error {
685685
func (s *CoreSecurityListResourceCrud) mapToEgressSecurityRule(fieldKeyFormat string) (oci_core.EgressSecurityRule, error) {
686686
result := oci_core.EgressSecurityRule{}
687687

688-
if description, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "description")); ok {
688+
if description, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "description")); ok && description != "" {
689689
tmp := description.(string)
690690
result.Description = &tmp
691691
}
@@ -818,7 +818,7 @@ func IcmpOptionsToMap(obj *oci_core.IcmpOptions) map[string]interface{} {
818818
func (s *CoreSecurityListResourceCrud) mapToIngressSecurityRule(fieldKeyFormat string) (oci_core.IngressSecurityRule, error) {
819819
result := oci_core.IngressSecurityRule{}
820820

821-
if description, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "description")); ok {
821+
if description, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "description")); ok && description != "" {
822822
tmp := description.(string)
823823
result.Description = &tmp
824824
}

0 commit comments

Comments
 (0)