Commit Graph

208 Commits (7e4d53ee3f8208c8b29153ee0e8614ced9e74744)

Author SHA1 Message Date
Elie ed2867fe96
chore: remove hint from the diagnostic output 2022-03-29 11:21:24 +02:00
Raphaël 7152fb6656
Merge pull request #1368 from snyk/refact/html_brand_logo
Add div block for brand logo in HTML output
2022-03-17 16:42:44 +04:00
sundowndev-snyk 4d319527a4 refactor(output): edit html brand logo style 2022-03-15 16:27:06 +04:00
Elie c9087ea294
feat: Log diagnostic and progress to stderr 2022-03-07 14:45:01 +01:00
Elie 69b9702d5d
feat: add options in analysis serialization 2022-03-04 17:12:55 +01:00
Elie 4734fbe5a8
feat: add `driftctl fmt` command 2022-03-04 17:10:02 +01:00
sundowndev 981a2aa84f refactor(analyzer): ScanDuration field in analysis
Add omitempty struct tag, rename the field to ScanDuration for consistency and make it uint instead of int.
2022-03-04 17:56:53 +04:00
sundowndev 56d57afb57 feat: add scan_duration json field 2022-03-04 15:16:28 +04:00
sundowndev 3a9195258b feat: add total_iac_source_count json field 2022-03-04 14:43:16 +04:00
William Beuil d2cc564494
fix: deep at true when only-managed 2022-02-28 12:27:59 +01:00
William Beuil 3b9f6c6a99
feat: only-managed / only-unmanaged flags 2022-02-28 12:27:59 +01:00
sundowndev 70bcd60fbd fix: use voidprinter for html output
We should not print anything but the scan output when we send output to stdout.
2022-02-28 11:48:14 +04:00
Elie 79c6a324f4
chore: add flags for azure backend options 2022-02-25 12:24:39 +01:00
Elie 7778462ade
feat: add azure blob backend 2022-02-23 15:01:59 +01:00
Murat Celep b927e57d71
Merge pull request #1348 from snyk/feat/service-arg-to-group-resouces-v2
Add a new ignores flag to parse ignore patterns as array
2022-02-21 16:23:36 +01:00
Craig Furman 959e489bd4 Disambiguate between drift and error exit codes
`driftctl scan` exits with zero only when there is no detected drift.
Prior to this commit, it exited with 1 when there was a non-panic error,
and also when there was detected drift. This makes error handling in
scripts more awkward than it needs to be.

This commit changes the exit code to 2 whenever there are errors during
a scan, whether that error is from a panic or not, leaving 1 as the exit
code used solely for when drift is detected.

Related: https://github.com/snyk/driftctl/issues/1350
2022-02-17 17:39:35 +00:00
Murat Celep 3ce9a1a177
extend ignore argument explanation 2022-02-17 09:56:50 +01:00
Murat Celep 428ab77d89
Add a new ignores flag to parse ignore patterns as array 2022-02-14 11:58:12 +01:00
Karni Wolf 0a1ed7d01e
chore: capitalize Usage: terraform [global options] <subcommand> [args]
The available commands for execution are listed below.
The primary workflow commands are given first, followed by
less common or more advanced commands.

Main commands:
  init          Prepare your working directory for other commands
  validate      Check whether the configuration is valid
  plan          Show changes required by the current configuration
  apply         Create or update infrastructure
  destroy       Destroy previously-created infrastructure

All other commands:
  console       Try Terraform expressions at an interactive command prompt
  fmt           Reformat your configuration in the standard style
  force-unlock  Release a stuck lock on the current workspace
  get           Install or upgrade remote Terraform modules
  graph         Generate a Graphviz graph of the steps in an operation
  import        Associate existing infrastructure with a Terraform resource
  login         Obtain and save credentials for a remote host
  logout        Remove locally-stored credentials for a remote host
  output        Show output values from your root module
  providers     Show the providers required for this configuration
  refresh       Update the state to match remote systems
  show          Show the current state or a saved plan
  state         Advanced state management
  taint         Mark a resource instance as not fully functional
  test          Experimental support for module integration testing
  untaint       Remove the 'tainted' state from a resource instance
  version       Show the current Terraform version
  workspace     Workspace management

Global options (use these before the subcommand, if any):
  -chdir=DIR    Switch to a different working directory before executing the
                given subcommand.
  -help         Show this help output, or the help for a specified subcommand.
  -version      An alias for the "version" subcommand. in output for consistency
2022-01-30 11:51:10 +02:00
sundowndev a0383a355e
feat: implement gcs backend
feat: implement gcs backend

Improve fake storage server implementation
2021-12-10 12:11:25 +01:00
Elie 1cdccb0be0
Move to @snyk 2021-12-06 14:29:39 +01:00
Elie c460a9e97a
Add a global switch to disable third party 2021-11-29 13:59:49 +01:00
Elie 4b3778a2d2
Make version check test more dynamic 2021-11-29 11:27:38 +01:00
Samuel Maftoul 572e39170e Change NewAnalysis signature to return a pointer, update occurences accordingly 2021-11-25 17:39:47 +01:00
Samuel Maftoul 8d3318725f Add a test for the updated output of the scan without deep mode 2021-11-25 17:07:46 +01:00
Samuel Maftoul b59e04e01e Fix broken tests: Add Deep where necessary 2021-11-25 16:55:14 +01:00
Samuel Maftoul 972eddcd79 Introduce NewAnalysis(), use it in analyzer, update fakeAnalyzer accordingly 2021-11-25 15:12:14 +01:00
Samuel Maftoul 7476cfa081 fix: display out of sync drifts only in deep mode 2021-11-25 12:56:21 +01:00
Elie 0bf122f7ee
Merge pull request #1216 from cbowman0/tfe
Support passing in the Terraform API URL to support Terraform Enterprise installations.
2021-11-15 17:40:32 +01:00
Christopher Bowman 03464d89bc Change TFCloudAPI to TFCloudEndpoint 2021-11-15 09:24:07 -05:00
Christopher Bowman 8ba05f995b Address remarks 2021-11-15 09:07:22 -05:00
Christopher Bowman 6c2f9653e1 Support passing in the Terraform API URL to support Terraform Enterprise installations.
Look for the correct domain in from credentials.tfrc.json
2021-11-12 17:46:32 -05:00
sundowndev 4a9cc26a77 refactor: add docs for ShouldPrint function 2021-11-12 17:05:05 +01:00
sundowndev d5f930e2f1 fix: display progress bar in stdout 2021-11-12 17:05:05 +01:00
William BEUIL e98c9f9e68
Merge branch 'main' into fix/unbuffered-chan 2021-11-10 15:53:44 +01:00
Craig Furman 612118d646 gen-driftignore defaults to writing to a file
Users can still print to stdout by passing `-o -`.
2021-11-08 10:43:18 +00:00
Craig Furman 4466a0430e gen-driftignore defaults to reading from stdin
Allow the input file to be specified as "-", which traditionally many
programs interpret as standard input. Make this value the default too,
as piping `driftctl scan | driftctl gen-driftignore` appears to be a
documented idiom.
2021-11-08 10:43:16 +00:00
William Beuil 0d0457ac92
Fix unbuffered channel 2021-11-04 13:07:31 +01:00
sundowndev bbc9f7fcf0 feat: add provider name to telemetry 2021-10-08 16:01:03 +02:00
sundowndev f1a1187754 feat: read version from tf lock file 2021-09-30 15:32:08 +02:00
Martin Guibert a8918f7df1 minor fixes, remove writealert. save reading alert in batch 2021-09-15 21:46:36 +02:00
Martin Guibert 6fd9986cbc do not fail when --from is incorrect, send alert. fail only if all from are incorrect 2021-09-15 20:36:32 +02:00
Elie 74b9394294
Add support for azure 2021-09-08 11:48:46 +02:00
sundowndev 6e48f177c3 refactor: output config usages 2021-09-07 15:43:40 +02:00
sundowndev 199259eb3d refactor: improve error logs 2021-09-07 15:41:54 +02:00
sundowndev 1157138af1 refactor: simplify code 2021-09-07 15:41:54 +02:00
sundowndev 1ae88df550 refactor: simplify code 2021-09-07 15:41:54 +02:00
sundowndev 8e7af5891a refactor: do not break on output error 2021-09-07 15:41:54 +02:00
sundowndev 8036b7a702 feat: allow multiple output flags 2021-09-07 15:41:54 +02:00
Elie f2097d6c58
Merge branch 'main' into add_scan_err_details 2021-09-07 14:18:35 +02:00