Skip to content

Create user-provided-service is not idempotent when name is already taken #3248

@sethboyles

Description

@sethboyles

Please fill out the issue checklist below and provide ALL the requested information.

  • I reviewed open and closed github issues that may be related to my problem.
  • I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with
Trying to create a user-provided-service that already exists fails with exit code 1 instead of succeeding (like most other commands, such as create-space and create-user). I seems like there have been previous efforts to make CF commands idempotent: #2264

What happened

$ cf create-user-provided-service myservice
Creating user provided service myservice in org org-1 / space org-1-space-1 as admin...
The service instance name is taken: myservice.
FAILED
# exit code 1

Expected behavior

$ cf create-user-provided-service myservice
Creating user provided service myservice  in org org-1 / space org-1-space-1 as admin...
The service instance already exists: myservice.
OK
# exit code 0

Exact Steps To Reproduce
Steps to reproduce the behavior; include the exact CLI commands and verbose output:

  1. Run cf create-user-provided-service myservice
  2. Run cf create-user-provided-service myservice again

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions