Prune usage? #318
-
Hello - Is there anyone with a working syntax for -prunesubaccount? I have tried to follow the documentation, and instead of removing, btpsa tries to create the subaccount, not remove it. ex: ./btpsa -prunesubaccount [sub account ID] -loginmethod sso -myemail [...] -globalaccount [my global account id] -region [myregion] Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, the flow of the btpsa is:
If the specified subaccount is not existing, btpsa will try to create it. Some points to consider:
|
Beta Was this translation helpful? Give feedback.
-
There is no option to "just" delete a subaccount with btpsa. There is also no such option in the BTP CLI. As I wrote in my response if the subaccount contains app subscriptions or service instance it cannot be deleted (Thats where your error comes from). They need to be cleaned up first. That's why they need to be specified in the usecase file that is then used to delete these resources, wait until deletion is done and then deletes the subaccount. I cannot reproduce the behavior you described in a regulat BTP account. If you think you run into a bug, you can open an issue. Please attach the logs, the parameters.json and the usecase.json you used and make sure that the data is anonymized where necessary. |
Beta Was this translation helpful? Give feedback.
Hi,
the flow of the btpsa is:
parameters.json
andusecase.json
filepruneusecase
is set to true all resources as defined in theusecase.json
will be deleted. The subaccount will not be deletedprunesubaccount
is set to true all resources as defined in theusecase.json
will be deleted. After that the subaccount will be removedIf the specified subaccount is not existing, btpsa will try to create it.
Some points to consider:
prunesubaccount
parameter is a boolean, so in order to trigger the deletion …