@@ -66,6 +66,7 @@ Format: 'organizations/{{organization_id}}'`,
6666 "scopes" : {
6767 Type : schema .TypeList ,
6868 Optional : true ,
69+ ForceNew : true ,
6970 Description : `Folder or project on which this policy is applicable.
7071Format: 'folders/{{folder_id}}' or 'projects/{{project_number}}'` ,
7172 MaxItems : 1 ,
@@ -261,12 +262,6 @@ func resourceAccessContextManagerAccessPolicyUpdate(d *schema.ResourceData, meta
261262 } else if v , ok := d .GetOkExists ("title" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , titleProp )) {
262263 obj ["title" ] = titleProp
263264 }
264- scopesProp , err := expandAccessContextManagerAccessPolicyScopes (d .Get ("scopes" ), d , config )
265- if err != nil {
266- return err
267- } else if v , ok := d .GetOkExists ("scopes" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , scopesProp )) {
268- obj ["scopes" ] = scopesProp
269- }
270265
271266 lockName , err := tpgresource .ReplaceVars (d , config , "accessPolicies/{{name}}" )
272267 if err != nil {
@@ -287,10 +282,6 @@ func resourceAccessContextManagerAccessPolicyUpdate(d *schema.ResourceData, meta
287282 if d .HasChange ("title" ) {
288283 updateMask = append (updateMask , "title" )
289284 }
290-
291- if d .HasChange ("scopes" ) {
292- updateMask = append (updateMask , "scopes" )
293- }
294285 // updateMask is a URL parameter but not present in the schema, so ReplaceVars
295286 // won't set it
296287 url , err = transport_tpg .AddQueryParams (url , map [string ]string {"updateMask" : strings .Join (updateMask , "," )})
0 commit comments