-
Notifications
You must be signed in to change notification settings - Fork 45
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
add JAAS cloud access resource #581
add JAAS cloud access resource #581
Conversation
- Rename genericJAASAccessModel to genericJAASAccessData to avoid overloading the word model - Remove AtLeastOneOf validator to allow users to remove all direct access to a resource. - Add test helper functions
- Add model access test that includes a user, group and service account.
resourcevalidator.AtLeastOneOf( | ||
path.MatchRoot("users"), | ||
path.MatchRoot("groups"), | ||
path.MatchRoot("service_accounts"), | ||
), |
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.
question:
Remove AtLeastOneOf validator to allow users to remove all direct access to a resource.
Why leave a resource with no content essentially? Wouldn't the resource just be deleted from the plan? Essentially, why would someone bother?
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.
Yes good point, I had a silly moment thinking it would be good to give the user the ability to remove all access but as you said, that's the same as deleting the resource. I've reverted this and fixed the test.
69fe8ed
to
2522110
Compare
2522110
to
04b134e
Compare
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.
LGTM
/merge |
#584 ## Description This PR adds a new resource `juju_jaas_access_offer` building on top of the generic access structure. Note that there is a minor issue with Juju application offer tags. In the Juju names/v4 package, an `applicationoffer` tag was based on an offer URL. In the names/v5 package this changed to an offer UUID. JAAS accepts both but currently the provider does not store the offer UUID (proposed change in #583). Until then I've opted to use the Juju names/v4 package to construct application offers based on an offer URL. This PR is based on top of #581. See the last commit for the changes. Partially resolves: [CSS-10638](https://warthogs.atlassian.net/browse/CSS-10638) ## Type of change - Add new resource [CSS-10638]: https://warthogs.atlassian.net/browse/CSS-10638?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Description
This PR adds a new resource
juju_jaas_access_cloud
building on top of the generic access structure. Note that in Juju clouds are a bit unique compared to models. Whereas model have a unique UUID, clouds do not and are unique based on the cloud name. Remaining resources for jaas_access includeapp-offers
,controller
,group
,service-account
. They will all follow the same structure and tests.The full list of changes include:
juju_jaas_access_cloud
resource and tests.Partially resolves: CSS-10638
Type of change