Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New data source: azuread_directory_object #847

Merged
merged 30 commits into from
Aug 25, 2022

Conversation

Threpio
Copy link
Contributor

@Threpio Threpio commented Jul 18, 2022

@github-actions github-actions bot added size/M and removed size/S labels Jul 18, 2022
@github-actions github-actions bot added size/L and removed size/M labels Jul 18, 2022
@Threpio Threpio marked this pull request as ready for review July 19, 2022 10:28
@manicminer manicminer linked an issue Jul 31, 2022 that may be closed by this pull request
@manicminer manicminer self-requested a review July 31, 2022 21:32
@manicminer manicminer added this to the v2.27.0 milestone Jul 31, 2022
Copy link
Contributor

@manicminer manicminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Threpio, thanks for working on this PR. This is looking pretty good! I have made some suggestions inline below, and we will also need to add some acceptance tests for this data source.

If you can take a look at the comments below, and look to add one or two acceptance tests (take a look at some other data sources for inspiration :), then I'll be happy to take another look. Thanks!

@manicminer manicminer modified the milestones: v2.27.0, v2.28.0 Aug 5, 2022
Threpio and others added 4 commits August 6, 2022 19:37
Additional Interpolation removed

Co-authored-by: Tom Bamford <[email protected]>
Wording as per suggestion

Co-authored-by: Tom Bamford <[email protected]>
@Threpio
Copy link
Contributor Author

Threpio commented Aug 6, 2022

Most of the comments have been applied and committed -Sorry for the horrible commit mess.

I am not sure that I have handled the directoryObject object properly now that I have changed it to a pointer from the client.Get function.

I will work on the tests asap.

@manicminer
Copy link
Contributor

@Threpio Thanks, I'll take another look once the tests are pushed. Don't worry about the commit history, we can squash it :)

@github-actions github-actions bot added size/L and removed size/XL labels Aug 8, 2022
@Threpio
Copy link
Contributor Author

Threpio commented Aug 8, 2022

Tests have been added -I cannot apply the last suggestion as it is outdated and yet not updated.

For the tests I have done 3 success cases - I do not see examples of failing to terraform configuration being used for different unit tests and so have not written these. The docs are linted but the content might need a 5-minute review.

Copy link
Contributor

@manicminer manicminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Threpio, many thanks for working on this and for adding the tests - which should be enough to cover usage of this data source.

I've run through this again and made some changes, mainly renaming the data source from azuread_principal_type to azuread_directory_object - because I expect we'll support additional object types in future and this will help us avoid deprecating a data source in order to rename it.

In addition to that, I've made some fixes to the tests, added some nil checking that I missed on my first review, and made some documentation updates. I added the latter as inline suggestions below to give you an idea of how we like to structure and word the docs.

This is a great addition, many thanks for your effort on this! As I have made some additional changes, I'm going to open this for another maintainer to review but pending any other changes I'm happy for this to be merged and added to the provider.

docs/data-sources/directory_object.md Outdated Show resolved Hide resolved
docs/data-sources/directory_object.md Show resolved Hide resolved
docs/data-sources/directory_object.md Outdated Show resolved Hide resolved
docs/data-sources/directory_object.md Outdated Show resolved Hide resolved
docs/data-sources/directory_object.md Outdated Show resolved Hide resolved
@manicminer manicminer requested a review from katbyte August 25, 2022 15:20
@manicminer manicminer changed the title principal_type_data_source - Feature - issue #824 New data source: azuread_directory_object Aug 25, 2022
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🦀

@manicminer manicminer merged commit 1381ad4 into hashicorp:main Aug 25, 2022
manicminer added a commit that referenced this pull request Aug 25, 2022
@github-actions
Copy link

This functionality has been released in v2.28.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Determining AzureAD Principal Type from Object ID
4 participants