Skip to content

Commit 2c5b3af

Browse files
handle emu idp group 404 (#2385)
Co-authored-by: Corey Lane <[email protected]>
1 parent af9cf3d commit 2c5b3af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

github/resource_github_emu_group_mapping.go

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ func resourceGithubEMUGroupMappingRead(d *schema.ResourceData, meta interface{})
8585

8686
group, resp, err := client.Teams.GetExternalGroup(ctx, orgName, id64)
8787
if err != nil {
88+
if resp != nil && resp.StatusCode == 404 {
89+
// If the group is not found, remove it from state
90+
d.SetId("")
91+
return nil
92+
}
8893
return err
8994
}
9095

0 commit comments

Comments
 (0)