TykTechnologies / tyk-sync

Tyk Sync - move Tyk configurations between multiple environments
Other
64 stars 23 forks source link

[TT-6616] Add delete command #78

Closed dmayo3 closed 2 months ago

dmayo3 commented 2 years ago

I've added this command to enable APIs and policies to be explicitly deleted.

Although the sync command can delete these resources, there's no control over what exactly it deletes. This is fine if you want a Tyk environment to exactly mirror a Git branch state with no extraneous resources, but this doesn't work if you want to share a single Tyk environment with different sets of APIs managed independently.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

RobLoach commented 2 years ago

@dmayo3 This definitely seems handy... What are your thoughts on a --all flag to specify all APIs? Or would that be a bit destructive? Or --apis=all or something :thinking:

dmayo3 commented 2 years ago

@RobLoach I'd imagine it would need to clean out the policies as well because policies are tied to APIs, so I would expect --all to wipe out both

I personally can't see any problem with adding such a flag, if you're going to use a delete --all command you'd expect it to be destructive

caroltyk commented 2 months ago

Thank you for the suggestion @dmayo3 . We are planning to implement delete API command in another CLI we have so this PR will be closed.