Skip to content
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 a reset command to remove destination resources #293

Merged
merged 9 commits into from
Nov 15, 2024

Conversation

michael-richey
Copy link
Collaborator

@michael-richey michael-richey commented Oct 9, 2024

What does this PR do?

Add a reset command that deletes resources at a destination

Description of the Change

The reset command will attempt to backup the destination before deleting the resources. Both the backup and the delete respect any filtering and the resources flag.

Possible Drawbacks

The drawback is inherent with the functionality. The user will have to ability to delete all resources in an org. This is mitigated in the following ways. First, the DDR check stops the script from running if the org is in a disaster state or if the org isn't a DDR org at all. The use has to manually override that check to stop it. Second, by default the reset command performs a backup.

Verification Process

Ran multiple resets of an org and was able to restore it from back up.

Additional Notes

Long term we may want to rethink the internal variable names with "source" and "destination" in them. In this specific case it gets confusing because we want to import and delete from the same datacenter, but sync-cli is very much built around the concept of moving data between a source and a destination. Renaming these might help with a future sync-cli where one or more sources are synced to one or more destinations. Imagine a large multi-org account wanting to sync dashboards from various child orgs to a single DDR R2 org.

@michael-richey michael-richey marked this pull request as ready for review October 15, 2024 14:36
@michael-richey michael-richey requested review from a team as code owners October 15, 2024 14:36
@michael-richey michael-richey merged commit beebf38 into main Nov 15, 2024
17 of 18 checks passed
@michael-richey michael-richey deleted the michael.richey/reset-command branch November 15, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants