Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ BUG FIXES:
* `r/tfe_project_notification_configuration`: Fix `Provider produced inconsistent result after apply` error on the sensitive `token` attribute when creating a configuration (such as `slack`) without a `token`. By @maed223 [#2140](https://github.com/hashicorp/terraform-provider-tfe/pull/2140)
* `r/tfe_project_notification_configuration`: Fix `Provider produced inconsistent result after apply` errors on the `triggers`, `email_addresses`, and `email_user_ids` attributes when they are configured as an empty set (`[]`). By @maed223 [#2140](https://github.com/hashicorp/terraform-provider-tfe/pull/2140)

FEATURES:
* `d/tfe_organization_members`: Now includes the users email address. By @kaefferlein [#2146](https://github.com/hashicorp/terraform-provider-tfe/pull/2146)

ENHANCEMENTS:
* `r/tfe_registry_module`: The `vcs_repo` VCS connection (`identifier`, `oauth_token_id`, and `github_app_installation_id`) can now be updated in place instead of forcing resource recreation. By @hashimoon [#2124](https://github.com/hashicorp/terraform-provider-tfe/pull/2124)

Expand Down
12 changes: 12 additions & 0 deletions internal/provider/data_source_organization_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ func dataSourceTFEOrganizationMembers() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},

"user_email": {
Description: "The email of the user.",
Type: schema.TypeString,
Computed: true,
},
},
},
},
Expand All @@ -69,6 +75,12 @@ func dataSourceTFEOrganizationMembers() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},

"user_email": {
Description: "The email of the user.",
Type: schema.TypeString,
Computed: true,
},
},
},
},
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/data_source_organization_members_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ func TestAccTFEOrganizationMembersDataSource_basic(t *testing.T) {
"data.tfe_organization_members.all_members", "members.0.organization_membership_id"),
resource.TestCheckResourceAttrSet(
"data.tfe_organization_members.all_members", "members.0.user_id"),
resource.TestCheckResourceAttrSet(
"data.tfe_organization_members.all_members", "members.0.user_email"),

resource.TestCheckResourceAttr(
"data.tfe_organization_members.all_members", "members_waiting.#", "1"),
resource.TestCheckResourceAttr(
"data.tfe_organization_members.all_members", "members_waiting.0.organization_membership_id", membership.ID),
resource.TestCheckResourceAttr(
"data.tfe_organization_members.all_members", "members_waiting.0.user_id", membership.User.ID),
resource.TestCheckResourceAttr(
"data.tfe_organization_members.all_members", "members_waiting.0.user_email", membership.Email),
),
},
},
Expand Down
3 changes: 2 additions & 1 deletion website/docs/d/organization_members.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ In addition to all arguments above, the following attributes are exported:
The `member` block contains:

* `user_id` - The ID of the user.
* `organization_membership_id` - The ID of the organization membership.
* `organization_membership_id` - The ID of the organization membership.
* `user_email` - The email of the user.
Loading