-
Notifications
You must be signed in to change notification settings - Fork 87
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
Make service plans public on cf_service_access #20
Conversation
The current Service Access can be imported using an `id`. | ||
|
||
If given `id` matches existing [`service_plan_visibilities`](https://apidocs.cloudfoundry.org/280/service_plan_visibilities/list_all_service_plan_visibilities.html), | ||
resource will be imported as a `service_access` targeting an organization. Otherwise, it will be imported as `service_access` controlling plan's public state. E.g. |
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.
I'd suggest the following clarification to doc:
If the given `id` matches [a service plan id](http://apidocs.cloudfoundry.org/280/service_plans/updating_a_service_plan.html), then the resource will be imported as `service_access` controlling plan's public state.
Otherwise, the import would fail
@mevansam I wonder background rationale for naming this resource |
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.
I concur with @gberche-orange on renaming this resource to cf_service_plan_access
. Should we make the change within this same pull request or create a new pull request? Other than that change look good pending update to documentation as per @gberche-orange 's review comment.
When creating a service-broker, service plans are private by default (ie: "public" : false attribute of /v2/service_plans, which make the service invisible in the marketplace).
The PR propose to add the optional
public
attribute to the cf_service_access resource. This attribute controls whenever the associated plan should be set public or private. It conflicts withorg
attribute thatcontrols per-org access.
Resource
Argument reference:
plan
- (Required) The ID of the service plan to grant access toorg
- (Optional) The ID of the Org which should have access to the plan. Conflicts withpublic
.public
- (Optional) Boolean that controls the public state of the plan. Conflicts withorg
.Import
Import syntax is unchanged but its behavior is modified.
If given
id
matches existingservice_plan_visibilities
, resource will be imported as aservice_access
targeting an organization. Otherwise, it will be imported asservice_access
controlling plan's public state.