@@ -45,6 +45,7 @@ func resourceApiGatewayGateway() *schema.Resource {
4545 "api_config" : {
4646 Type : schema .TypeString ,
4747 Required : true ,
48+ ForceNew : true ,
4849 DiffSuppressFunc : compareResourceNames ,
4950 Description : `Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}` ,
5051 },
@@ -255,12 +256,6 @@ func resourceApiGatewayGatewayUpdate(d *schema.ResourceData, meta interface{}) e
255256 } else if v , ok := d .GetOkExists ("display_name" ); ! isEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , displayNameProp )) {
256257 obj ["displayName" ] = displayNameProp
257258 }
258- apiConfigProp , err := expandApiGatewayGatewayApiConfig (d .Get ("api_config" ), d , config )
259- if err != nil {
260- return err
261- } else if v , ok := d .GetOkExists ("api_config" ); ! isEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , apiConfigProp )) {
262- obj ["apiConfig" ] = apiConfigProp
263- }
264259 labelsProp , err := expandApiGatewayGatewayLabels (d .Get ("labels" ), d , config )
265260 if err != nil {
266261 return err
@@ -280,10 +275,6 @@ func resourceApiGatewayGatewayUpdate(d *schema.ResourceData, meta interface{}) e
280275 updateMask = append (updateMask , "displayName" )
281276 }
282277
283- if d .HasChange ("api_config" ) {
284- updateMask = append (updateMask , "apiConfig" )
285- }
286-
287278 if d .HasChange ("labels" ) {
288279 updateMask = append (updateMask , "labels" )
289280 }
0 commit comments