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

[Feature] Allows DryRun #6

Open
johandry opened this issue Mar 10, 2020 · 0 comments
Open

[Feature] Allows DryRun #6

johandry opened this issue Mar 10, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@johandry
Copy link
Owner

Is your feature request related to a problem? Please describe.
Allows the option to do a DryRun

Describe the solution you'd like
Option 1: c.DryRun(true).Apply() then c.DryRun(false)
Option 2: c.Apply(..., opt) where opt.DryRun = true

Describe alternatives you've considered
So far the DryRun have not been considered.

Proposal
Create an attribute of the client named DryRun. For every modification method (Apply, Create, Delete, Replace) if the client has the DryRun attribute set to true, the helper should call DryRun(true). Example:

helper := resource.NewHelper(info.Client, info.Mapping)
if c.DryRun {
  helper = helper.DryRun(true)
}

Additional context
This may be an option to validate if the resources to visit are valid to apply, delete, create or replace. Optionally, it may be an option to get YAML or JSON representation of a resource.

References
None

@johandry johandry self-assigned this Mar 10, 2020
@johandry johandry added the enhancement New feature or request label Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant