-
Notifications
You must be signed in to change notification settings - Fork 23
AAP-46310 Add aap_organization data source with name/id lookup support #107
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First we've decided to not have reference to the testing frameworks in the public repository. For this reason entire env.sh
file should be removed.
Second, please revert all the changes in utils.go
. I've added #108 with new acceptance tests to show the bug and solution. These changes does not fix the bug and cause confusion around the problem.
Is this ready for review @arrestle? I see it's been moved out of draft but there's no description and the title of the PR doesn't really describe what it does. To be clear, I see the Jira ID and yes that does connect it to our issue tracker and I can look that up. However, my feedback is that I can't tell what this is at a glance. It should have a meaningful title and a description. |
…e supported platforms section (ansible#110)
…orm-provider-aap into organization-data-source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things after merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor name change requests. Looks good otherwise, great work!
@dleehr good point. At retro we were talking about a PR template. I like this one because I feel it explains the "why" of the PR and not just the "what". https://www.pullrequest.com/blog/writing-a-great-pull-request-description/ |
Co-authored-by: Dave Mulford <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implements the changes I asked about. Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also inline with Aaron's findings we will need to override these functions to Organization data source. Revert changes to include name out of the BaseAPIModel these should be attached to the OrganizationAPIModel directly.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all your hard work on this! I feel like we are finally at the finish line
What?
Implements
data.aap_organization
data source to allow referencing AAP organizations by name or ID in Terraform configurations.Why?
Currently users must hard-code organization IDs when creating resources like
aap_inventory
in non-default organizations, which is a poor user experience. This data source enables lookup by human-readable organization names, making Terraform configurations more maintainable and user-friendly.How?
name
andid
attributes for flexible lookupTesting strategy:
Test Coverage:
aap_inventory
resource creation in non-default organizationsResolves: AAP-46310
Depends on: AAP-46290
Usage Example:
Anything else?
Architecture Integration:
Diagram 1: Provider Architecture & Data Flow