@@ -144,6 +144,7 @@ If this parameter is 0, a default value of 5 is used.`,
144144 "enable_message_ordering" : {
145145 Type : schema .TypeBool ,
146146 Optional : true ,
147+ ForceNew : true ,
147148 Description : `If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to
148149the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they
149150may be delivered in any order.` ,
@@ -653,12 +654,6 @@ func resourcePubsubSubscriptionUpdate(d *schema.ResourceData, meta interface{})
653654 } else if v , ok := d .GetOkExists ("retry_policy" ); ! isEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , retryPolicyProp )) {
654655 obj ["retryPolicy" ] = retryPolicyProp
655656 }
656- enableMessageOrderingProp , err := expandPubsubSubscriptionEnableMessageOrdering (d .Get ("enable_message_ordering" ), d , config )
657- if err != nil {
658- return err
659- } else if v , ok := d .GetOkExists ("enable_message_ordering" ); ! isEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , enableMessageOrderingProp )) {
660- obj ["enableMessageOrdering" ] = enableMessageOrderingProp
661- }
662657
663658 obj , err = resourcePubsubSubscriptionUpdateEncoder (d , meta , obj )
664659 if err != nil {
@@ -704,10 +699,6 @@ func resourcePubsubSubscriptionUpdate(d *schema.ResourceData, meta interface{})
704699 if d .HasChange ("retry_policy" ) {
705700 updateMask = append (updateMask , "retryPolicy" )
706701 }
707-
708- if d .HasChange ("enable_message_ordering" ) {
709- updateMask = append (updateMask , "enableMessageOrdering" )
710- }
711702 // updateMask is a URL parameter but not present in the schema, so replaceVars
712703 // won't set it
713704 url , err = addQueryParams (url , map [string ]string {"updateMask" : strings .Join (updateMask , "," )})
0 commit comments