Skip to content

Commit

Permalink
Environment ID gets set incorrectly on update (#1058)
Browse files Browse the repository at this point in the history
* Update resource_github_repository_environment.go

* Update resource_github_repository_environment.go

* Remove now unnecessary strconv import

Co-authored-by: Keegan Campbell <kfcampbell@github.com>
  • Loading branch information
aceresia-bg and kfcampbell authored Mar 11, 2022
1 parent 746182f commit 06c6fd7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions github/resource_github_repository_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"log"
"net/http"
"strconv"

"github.com/google/go-github/v42/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
Expand Down Expand Up @@ -176,7 +175,7 @@ func resourceGithubRepositoryEnvironmentUpdate(d *schema.ResourceData, meta inte
return err
}

d.SetId(buildTwoPartID(repoName, strconv.FormatInt(resultKey.GetID(), 10)))
d.SetId(buildTwoPartID(repoName, resultKey.GetName()))

return resourceGithubRepositoryEnvironmentRead(d, meta)
}
Expand Down

0 comments on commit 06c6fd7

Please sign in to comment.