add ability to read an organization membership by org membership id#1036
Open
AmineChikhaoui wants to merge 1 commit intohashicorp:mainfrom
Open
add ability to read an organization membership by org membership id#1036AmineChikhaoui wants to merge 1 commit intohashicorp:mainfrom
AmineChikhaoui wants to merge 1 commit intohashicorp:mainfrom
Conversation
00850d2 to
dbd287c
Compare
This will be useful in case you need to read all organization
memberships and pull out information such as emails of all users so that
it can be used to create downstream resources, example:
```terraform
data "tfe_organization_members" "users" {
organization = var.tfc_org
}
data "tfe_organization_membership" "test" {
for_each = toset([
for index, member in data.tfe_organization_members.users.members :
member.organization_membership_id
])
organization = var.tfc_org
organization_membership_id = each.value
}
output "user_emails" {
value = [
for index, member in data.tfe_organization_membership.test :
member.email
]
}
```
Related issue: hashicorp#871
63275e6 to
87612ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will be useful in case you need to read all organization memberships and pull out information such as emails of all users so that it can be used to create downstream resources, example:
Related issue: #871
Description
Describe why you're making this change.
Remember to:
Testing plan
External links
Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.
Output from acceptance tests
Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.
If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.