With r_default now unable to delete, return nil instead of error if it's attempted

This commit is contained in:
Jeff Mitchell committed 2020-09-21 21:54:00 -04:00
1 parent 4cc5785dc8
commit b578fdcf98
1 file changed
+4
+4
View File
@@ -321,6 +321,10 @@ func resourceRoleUpdate(ctx context.Context, d *schema.ResourceData, meta interf
}
func resourceRoleDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
if d.Get(roleDefaultRoleKey).(bool) {
return nil
}
md := meta.(*metaData)
rc := roles.NewClient(md.client)