@@ -77,6 +77,11 @@ func CoreRouteTableResource() *schema.Resource {
7777 Computed : true ,
7878 Deprecated : FieldDeprecatedForAnother ("cidr_block" , "destination" ),
7979 },
80+ "description" : {
81+ Type : schema .TypeString ,
82+ Optional : true ,
83+ Computed : true ,
84+ },
8085 "destination" : {
8186 Type : schema .TypeString ,
8287 Optional : true ,
@@ -367,6 +372,11 @@ func (s *CoreRouteTableResourceCrud) mapToRouteRule(fieldKeyFormat string) (oci_
367372 result .DestinationType = tmp
368373 }
369374
375+ if description , ok := s .D .GetOkExists (fmt .Sprintf (fieldKeyFormat , "description" )); ok && description != "" {
376+ tmp := description .(string )
377+ result .Description = & tmp
378+ }
379+
370380 cidrBlockChanged := false
371381 cidrBlock , cidrBlockPresent := s .D .GetOkExists (fmt .Sprintf (fieldKeyFormat , "cidr_block" ))
372382 if cidrBlockPresent && s .D .HasChange (fmt .Sprintf (fieldKeyFormat , "cidr_block" )) {
@@ -406,6 +416,10 @@ func RouteRuleToMap(obj oci_core.RouteRule) map[string]interface{} {
406416 result ["cidr_block" ] = string (* obj .CidrBlock )
407417 }
408418
419+ if obj .Description != nil {
420+ result ["description" ] = string (* obj .Description )
421+ }
422+
409423 if obj .Destination != nil {
410424 result ["destination" ] = string (* obj .Destination )
411425 }
@@ -434,6 +448,9 @@ func routeRulesHashCodeForSets(v interface{}) int {
434448 } else if destinationPresent && destination != "" {
435449 buf .WriteString (fmt .Sprintf ("%v-" , destination ))
436450 }
451+ if description , ok := m ["description" ]; ok && description != "" {
452+ buf .WriteString (fmt .Sprintf ("%v-" , description ))
453+ }
437454 if destinationPresent && destination != "" {
438455 buf .WriteString (fmt .Sprintf ("%v-" , destination ))
439456 } else if cidrBlockPresent && cidrBlock != "" {
0 commit comments