Skip to content

Commit

Permalink
TeamsUpdate - fixing small bug, again missing update (#417)
Browse files Browse the repository at this point in the history
* fixing small bug, again missing update

* codeowners
  • Loading branch information
leofigy committed Mar 1, 2021
1 parent 1e45aae commit 75ea01d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1,8 @@
# Global rule
* @themantissa

# examples
/examples/** @nikhil-mongo

# resources & datasources, provider
/mongodbatlas/** @coderGo93 @leofigy
7 changes: 7 additions & 0 deletions mongodbatlas/resource_mongodbatlas_team.go
Expand Up @@ -85,7 +85,14 @@ func resourceMongoDBAtlasTeamRead(d *schema.ResourceData, meta interface{}) erro
teamID := ids["id"]

team, _, err := conn.Teams.Get(context.Background(), orgID, teamID)

if err != nil {
// new resource missing
reset := strings.Contains(err.Error(), "404") && !d.IsNewResource()
if reset {
d.SetId("")
return nil
}
return fmt.Errorf(errorTeamRead, err)
}

Expand Down

0 comments on commit 75ea01d

Please sign in to comment.