Commit Graph

654 Commits (02c2aae12dbcf76b5e2a65e67d1fcc625f79eab8)

Author SHA1 Message Date
Liam Cervante 5bbdc4c3b6
terraform test: allow providers in test files to reference variables (#34069)
3 years ago
Liam Cervante 5294c2bb47
Process only relevant variables in the testing framework (#34072)
3 years ago
Liam Cervante 01c0480e77
Test framework will produce regular updates in -json mode (#33953)
3 years ago
James Bardin 2664c062c9
Merge pull request #33932 from hashicorp/jbardin/import-for-each
3 years ago
Liam Cervante 8ecda5f708
Increase timeout length after fatal interrupts for test cloud runs (#33956)
3 years ago
Liam Cervante fba5dad097
Test files should be marked as skipped if all their run blocks were skipped (#33950)
3 years ago
James Bardin 2c4608fe9e update import validate test
3 years ago
James Bardin e1a8270bde expose ImportTarget.IDString for legacy import
3 years ago
James Bardin 5f13eecc38 remove ImportTarget.ID field
3 years ago
James Bardin df23c703ce import block decode
3 years ago
Liam Cervante f8d4664bcd
Add additional validation around unknown and null values in test variables (#33861)
3 years ago
Liam Cervante ffbcaf8bef
Implement TFC integration for private module registry test runs (#33710)
3 years ago
Liam Cervante 1c7dfa22b7 Add warning when testing and combining expect_failures with apply operations
3 years ago
Liam Cervante 84e2ebc225 apply defaults when processing variables for assertions
3 years ago
Liam Cervante 041b54fb4b
explicitely disallow duplicate run block names in test files (#33836)
3 years ago
Liam Cervante a560730376
Make the test command fail if resources could not be cleaned up (#33809)
3 years ago
Liam Cervante 91d26b6ea6
Refactor file and run block feedback frequency (#33840)
3 years ago
Liam Cervante 802d49a9ca
Handle null outputs in Terraform test files (#33781)
3 years ago
Brandon Croft 5867c4124e
Ignore remote version conflict when running force-unlock
3 years ago
Liam Cervante 487eeda94e
[testing framework] Add documentation (#33454)
3 years ago
CJ Horton 1706d643d6 more missing headers
3 years ago
Liam Cervante 4c83e2d524
Terraform test directory must be local to the config directory (#33760)
3 years ago
Liam Cervante edcc35c96c
testing framework: move local implementation into local directory (#33734)
3 years ago
Liam Cervante 2ea141b3f4
Embed the schemas directly in the testing framework JSON verbose outputs (#33755)
3 years ago
Jared Baker c566bcd6f7
Merge pull request #33730 from hashicorp/s3/modernization
3 years ago
Liam Cervante 5e63aa01c7
Allow referencing higher level variables from run blocks (#33722)
3 years ago
Liam Cervante 9bc5c7afbb
Include run block for JSON fatal interrupt test summaries (#33720)
3 years ago
Jared Baker de02f3461b
internal/command: fix slices.SortFunc signature
3 years ago
Brandon Croft 114f876f81
Merge pull request #33602 from hashicorp/TF-8071-download-and-verify-the-plugin-in-terraform
3 years ago
Brandon Croft 3d1e07dcf3
Write command output to Meta.Streams, more plugin err handling
3 years ago
Brandon Croft 8f4a430e41
refactor: cloudplugin VersionManager -> BinaryManager
3 years ago
CJ Horton 98b81d3c50 add missing copyright headers
3 years ago
Liam Cervante 9742f22c4e
Introduce 'run' keyword for referencing outputs from earlier run blocks (#33683)
3 years ago
Liam Cervante 836c64f172
simplify test_context evaluation (#33677)
3 years ago
Brandon Croft 63e017b81b
cloudplugin: download and verify plugin
3 years ago
hashicorp-copywrite[bot] 53c34ff49c
Update copyright file headers to BUSL-1.1
3 years ago
Liam Cervante 126f34e4e8 Implement updates to testing framework based on recent feedback
3 years ago
Liam Cervante 3cce200d0e Fix root cause of race condition in testing framework tests
3 years ago
Liam Cervante f1ca74f09f Update JSON_UI_VERSION after test framework changes
3 years ago
Liam Cervante f8b1fe47dd
Make config errors more important during init operations (#33628)
3 years ago
James Bardin e26d07dda4
Merge pull request #33634 from hashicorp/jbardin/init-from-module-warnings
3 years ago
James Bardin ea1144995f update callers of InstallModules
3 years ago
kmoe 765c25d2ed
allow interpolation in import block id (#33618)
3 years ago
Liam Cervante 8b764f2e1b
fix race condition in no_provides_in_main test (#33616)
3 years ago
Liam Cervante 3bea1171af
test framework: expand variables available to test assertions (#33611)
3 years ago
Liam Cervante 4560a83721
test framework: include transformed config before validating config (#33608)
3 years ago
Liam Cervante f397954c52
testing framework: allow users to specify deeply nested testing directories (#33584)
3 years ago
Liam Cervante 4122ba86fc
terraform test: fix crash when using nested modules from test run blocks (#33589)
3 years ago
Liam Cervante e1019b3641
testing framework: validate the configuration before terraform test (#33559)
3 years ago
Liam Cervante 55792309eb
test framework: add support for testing files to fmt command (#33576)
3 years ago
Liam Cervante 080ddead6e
testing framework: perform a plan before starting any tests (#33561)
3 years ago
Liam Cervante 083c9afd5b
testing framework: add trace and debug statements during test executions (#33554)
3 years ago
Brandon Croft e5ce25099c
Apply suggestions from code review
3 years ago
Brandon Croft 9bb566dcdb
Update cloudplugin type casting to simplify adding future versions
3 years ago
Brandon Croft 2c3d134705
Adds `cloud` subcommand with some toy options
3 years ago
Brandon Croft fec1ca69ac
Fix console godoc
3 years ago
Sebastian Rivera 08e58fd484 Fix saved plan test regressions, fixtures
3 years ago
Nick Fagerlund 1cbc95ce56 Use wrapped types to clean up error reporting in show command
3 years ago
Nick Fagerlund ed27fa096e command/views/show_test: Update method arguments, add test cases
3 years ago
Nick Fagerlund 12af8518ff command/show_test: Update expected error text
3 years ago
Nick Fagerlund 3a9ce2afb1 Update show command and view to support inspecting cloud plans
3 years ago
Nick Fagerlund 0df3c143bb New plans.Quality type for display-relevant facts about a plan
3 years ago
Nick Fagerlund f9d937a4dd Apply a confirmable run when given a saved cloud plan (#33270)
3 years ago
Brandon Croft c1a730314d
Relocate localterraform.com aliasing to backend configurators
3 years ago
Liam Cervante ad26644578
Fix flaky test in views package (#33560)
3 years ago
Liam Cervante c91f91cc9e
testing framework: change test file extension to .tftest.hcl (#33553)
3 years ago
Liam Cervante ca85d3bf85
Implement word wrapping in the terraform test view functions (#33547)
3 years ago
Liam Cervante 6c7db16566
testing framework: refactor interrupt logic for immediate exits (#33532)
3 years ago
Liam Cervante 6882dd9530
testing framework: introduce test command optional flags (#33504)
3 years ago
Liam Cervante 2cc81cfec6
testing framework: implement panic handling (#33525)
3 years ago
Liam Cervante 837716a703
testing framework: finalise expect_failures functionality (#33506)
3 years ago
Martin Atkins 7bee77bdd3 command: Start of propagating OpenTelemetry context
3 years ago
Craig Wright 8f5064e6b4
Merge pull request #33433 from chaosaffe/fix-getcommand-helptext
3 years ago
Liam Cervante 87ed762619
Make flaky 'TestTest_DoubleInterrupt' test more robust (#33503)
3 years ago
Liam Cervante 4862812c94
testing framework: introduce interrupts for stopping tests (#33477)
3 years ago
Liam Cervante 4b34902fab
[testing framework] allow tests to define and override providers (#33466)
3 years ago
Liam Cervante 5acc95dda7
[Testing Framework] Add module block to test run blocks (#33456)
3 years ago
Liam Cervante c9bc7e8479
Add input validation into the 'checks' outputs and tracking (#33481)
3 years ago
CJ Horton 2622e89cfb
Merge pull request #33448 from agustinguayama/fix/small_typo
3 years ago
James Bardin 6be6f69d61
Merge pull request #33482 from hashicorp/jbardin/schema-cache
3 years ago
kmoe d1a5dfa1ad
command: test plan -refresh= arg ordering (#33483)
3 years ago
James Bardin cf5ebaf685 s/Schemas/ProviderSchema/
3 years ago
James Bardin 36d34135ad replace remaining types in tests
3 years ago
James Bardin d487ce20e1 update jsonprovider to use new schema type
3 years ago
James Bardin 53901a7e62 Add basic global schema cache
3 years ago
Liam Cervante ea162f6ab5
[testing framework] prepare for beta phase of development (#33445)
3 years ago
Liam Cervante 3613e972c5
Plan renderer: Support users indexing integer paths with stringified numbers (#33475)
3 years ago
Agustin Guayama db5b81d2c1
fix typo in terraform/internal/command /init.go
3 years ago
Liam Cervante 2eb99a0e44
Fix the Terraform build after recent merges (#33436)
3 years ago
Liam Cervante 212ae6c4ba
Introduce separate testing scope for reference validation (#33339)
3 years ago
Liam Cervante dfc26c2ac4
[Testing Framework] Add test command to Terraform CLI (#33327)
3 years ago
Liam Cervante ed822559e5
[Testing framework] Implement JSON view functionality for test command (#33400)
3 years ago
kmoe fbff64ad45
configs: remove import block duplicate id check (#33434)
3 years ago
Jason Murray 79669df479
Remove PATH from GetCommand helpText
3 years ago
Andrew Hickman 49f99db1c2
`terraform show -json`: Add Errored field to output for plan (#33372)
3 years ago
Liam Cervante ce8fd2943d
[Testing Framework] Add test structure to views package for rendering test output (#33324)
3 years ago
Liam Cervante 48c818927c Remove old implementation of terraform test command
3 years ago
Katy Moe 7ce5503c7a views: fix wordwrap
3 years ago
kmoe 5900d1177c
cloud: assert import block compatibility (#33282)
3 years ago
kmoe 4386a15684
command: help text for generate-config-out (#33279)
3 years ago
Martin Atkins 696cd68913 command/views: Describe unknown collection bounds in diagnostics
3 years ago
kmoe be2ad69eda
plannable import: safer config generation and schema filters (#33232)
3 years ago
kmoe b4d1146f58
plannable import: improve gen config human plan output (#33194)
3 years ago
CJ Horton bd6ba6cf99
check for duplicate import blocks (#33190)
3 years ago
Liam Cervante d5fed58fc5
plannable import: write generated config to out flag (#33186)
3 years ago
CJ Horton 5d7864316e
Merge pull request #33160 from hashicorp/radditude/apply-counts
3 years ago
Liam Cervante 192cb255a6
checks: no longer experimental (#33184)
3 years ago
Liam Cervante 4d837df546
Plannable import: Add generated config to JSON and human-readable plan output (#33154)
3 years ago
Liam Cervante 79f7f59155
Plannable import: Generate config for imported resources during the plan. (#33153)
3 years ago
CJ Horton bc084858b1 add import hooks for plan and apply
3 years ago
Liam Cervante 2793af042c Revert "Plannable import: Make the streamed logs more consistent during a plan operation (#33155)"
3 years ago
Liam Cervante 3c20f7b340
Plannable import: Make the streamed logs more consistent during a plan operation (#33155)
3 years ago
hashicorp-copywrite[bot] bb36298b21 [COMPLIANCE] Add Copyright and License Headers
3 years ago
Liam Cervante 77f10c4f68
Imports should come before Adds in change summaries (#33147)
3 years ago
Liam Cervante 81eb73731d
[Plannable Import] Implement streamed logs for plan (#33106)
3 years ago
Liam Cervante 54c1c1162f
[Plannable Import] Implement human-readable plan rendering (#33113)
3 years ago
hashicorp-copywrite[bot] 325d18262e [COMPLIANCE] Add Copyright and License Headers
3 years ago
Liam Cervante b5576159da
Migrate 'state show' command to new renderer (#33116)
3 years ago
Lauren 50c3f53595 add resource_drift logtype
3 years ago
Liam Cervante b54668f44c
make the unknown attribute renderer consider the force replacement metadata (#33065)
3 years ago
Liam Cervante 14123e277c
Include sensitive metadata from the schema when building the json state output (#33059)
3 years ago
Liam Cervante 519a18aedf
Propagate unknown and sensitive metadata to dynamic attributes (#33057)
3 years ago
Liam Cervante 357012a2f3
Refactor of differ to make code reuse easier (#33054)
3 years ago
Liam Cervante aae6990d38
Add native `plantimestamp` function to Terraform (#32980)
3 years ago
Sebastian Rivera e6c3aab6c5
Merge pull request #33018 from hashicorp/tf-5529-sro-tfe-version-check
3 years ago
Liam Cervante 2c624acea1
Fix rendering unknown values in map and null string primitives (#33029)
3 years ago
Sebastian Rivera 300a60f393 Fix typo in format version check
3 years ago
Liam Cervante 978263efe9
Checks: Introduce check blocks into the terraform node and transform graph (#32735)
3 years ago
James Bardin 86c0c3bf80
Merge pull request #32846 from hashicorp/fix-32793
3 years ago
Reda Khaled bf723bd65a fix(init_test.go): in TestInitProvidersLocalOnly tst, set TF_CLI_CONFIG_FILE env var to an empty val
3 years ago
Reda Khaled fa9d044c58 bugfix(cliconfig.go): emit a warning msg if bad CLI config file path
3 years ago
James Bardin 06f1ceb026 add some output values to the show state test
3 years ago
James Bardin 5ed7f2a798 always use the RenderHuman constructor
3 years ago
Liam Cervante 15ecdb66c8
Fix no-op outputs causing the plan renderer to skip the 'no changes' message (#32820)
3 years ago
Alisdair McDiarmid 8df065a2fe initwd: Switch from earlyconfig to configs
3 years ago
Reda Khaled 100c44b6c3
bugfix: issue-28274, terraform providers mirror command should honor terraform lock file
3 years ago
Martin Atkins a86cef4d50 cliconfig: Allow breaking the dependency lock file using the environment
3 years ago
CJ Horton 3c54e42080
Merge pull request #32695 from hashicorp/radditude/init-config-warning
3 years ago
kmoe b435b4ccde
cliconfig: more provider_installation err detail (#32722)
3 years ago
Sebastian Rivera 6d0a191ec4 Handle provisioner log types in renderer
3 years ago
CJ Horton 30f8b014f8 keep the friendly error message whenever possible
3 years ago
CJ Horton 727e22e762 add tests for init syntax error handling
3 years ago
Daniel Banck 4fa77727b5
Introduce `metadata functions` command (#32487)
3 years ago
Liam Cervante d212a72d1d
structured run output: impose canonical ordering on jsonstate and jsonplan packages (#32649)
3 years ago
Sebastian Rivera de574ae6d4
Initial implementation of structured logging in cloud backend (#32504)
3 years ago
Liam Cervante 4fa7cd0a68
structured renderer: fix closing json tags when rendering with no symbols (#32642)
3 years ago
Liam Cervante d818d7850d
Structured Renderer: use the new renderer when rendering the state in addition to the plan (#32629)
3 years ago
zetHannes c70244426a
Fix for no json output of state locking actions for --json flag (#32451)
3 years ago
Brandon Croft 9fd76e56cd
Factor out terraform-config-inspect/tfconfig during init
3 years ago
Sheridan C Rawlins 75e5ae27a2
[fixes 31700] Add mTLS support for http backend by way of client cert & key, as well as enterprise cacert. (#31699)
3 years ago
Martin Atkins e2380b1038 cliconfig: Allow forcing use of the plugin cache despite the lock file
3 years ago
Liam Cervante 7d1ea52077
Structured Plan Renderer: another round of fixes after more equivalence testing (#32537)
3 years ago
Liam Cervante 6dc49150b7
Structured Plan Renderer: Read the data source schemas from the right place (#32532)
3 years ago
Liam Cervante 8d61c5bfc4
Use the new structured renderer in place of the old diffs package (#32520)
3 years ago
Liam Cervante 99823e4a15
Structured Plan Renderer: Fix minor bugs causing diffs in the equivalence tests. (#32519)
3 years ago
Liam Cervante e015b15f12
Structured Plan Renderer: Remove attributes that do not match the relevant attributes filter (#32509)
3 years ago
Liam Cervante 95782f2491
Structured plan renderer: Implement the main functionality for the renderer (#32496)
3 years ago
Liam Cervante af0ff90d6e
Remove outputs from the jsonplan that are not from the root module (#32503)
3 years ago
Liam Cervante c125397da1
push the colorize actions as locally as possible (#32502)
3 years ago
James Bardin 96b1318167 remove deprecated condition_results from plan
3 years ago
Liam Cervante f6d625103c
Structured plan renderer: refactor replace paths logic (#32489)
3 years ago
Liam Cervante 38afb41787
Structured plan renderer: Introduce support for multiline and JSON strings (#32488)
3 years ago
Liam Cervante 8330b7295b
Structured plan renderer: Add support for map blocks and sensitive blocks. (#32491)
3 years ago
Liam Cervante 21bb677db7
Structured Plan Renderer: Naming and package structure refactor (#32486)
3 years ago
Liam Cervante a086453783
Structured Plan Renderer: Refactor Primitive and Sensitive value processing (#32476)
3 years ago
Liam Cervante 46ab53d651
Structured Plan Renderer: Escape object and block keys that don't match HCL syntax (#32483)
3 years ago
Liam Cervante 7a3fc48b70
Structured Plan Renderer: Add tests validating behaviour of dynamic types (#32482)
3 years ago
Liam Cervante d31631675b
Add support for Tuples into the structured plan renderer (#32479)
3 years ago
Liam Cervante 2d66eee872
Structured Plan Renderer: Address comments raised in previous PRs (#32478)
3 years ago
Liam Cervante 1332d315b6
Structured Plan Renderer: Remove generic `interface{}` entry point (#32477)
3 years ago
Liam Cervante 9bc5ded27a
Add support for outputs in the structured renderer (#32426)
3 years ago
Liam Cervante 05f1764a0d
Add support for blocks in the structured renderer (#32422)
3 years ago
Liam Cervante 69cce3597f
Add support for sets in the structured renderer (#32409)
3 years ago
Liam Cervante aff94591c1
Add support for lists in the structured renderer (#32401)
3 years ago
Liam Cervante 8975eebf84
Add support for maps in the structured renderer (#32397)
3 years ago
Liam Cervante b097d8873d
Add support for the replace paths data in the structured renderer (#32392)
3 years ago
Liam Cervante 1eebcf875f
Add support for object attributes in the structured renderer (#32391)
3 years ago
Liam Cervante b8b1a8d430
Add support for unknown/computed values in the structured renderer (#32378)
3 years ago
Liam Cervante 6ab277f6ba
Add support for sensitive values in the structured renderer (#32375)
3 years ago
Liam Cervante 71daef058f
Add rendering functionality for primitives to the structured renderer (#32373)
3 years ago
Liam Cervante aff7d360e1
Add skeleton functions and API for refactored renderer (#32368)
3 years ago
Liam Cervante b917154a97
Make required JSON structured output structures public for processing (#32367)
3 years ago
James Bardin 721df0e68d
Merge pull request #32395 from hashicorp/jbardin/plan-output-on-error
3 years ago
James Bardin a6098b67fa fix test state
3 years ago
James Bardin 25ac4d33e4
Merge pull request #31633 from brittandeyoung/f-workspace-selectornew
3 years ago
Brittan DeYoung 8881418c99
Update internal/command/workspace_select.go
3 years ago
James Bardin d60d247e40
Merge pull request #31318 from twittyc/twittyc/terraformWorkspaceInvalidArgsReturnsNon0
3 years ago
James Bardin 76d5e4a9cb add command test for errored plan
3 years ago
James Bardin 5aa088e385 remove -always-out
3 years ago
Martin Atkins 4660dacd59 command: Prototype of handling errored plans
3 years ago
James Bardin 404b284911
Merge pull request #31757 from hashicorp/jbardin/terraform-data
3 years ago
Conor Evans e206d4e83e
fix(unlock): amend force-unlock description (#32363)
3 years ago
James Bardin d0d6501c1f s/trigger/triggers_replace/
3 years ago
James Bardin 58e15c7f0e add terraform_data e2e test
3 years ago
alisdair ec6451a82a
Merge pull request #31999 from JarrettSpiker/jspiker/workspace-delete-rum-docs
3 years ago
Jarrett Spiker 21d98697cb Add manual line breaks to workspace delete command help text
3 years ago
Jarrett Spiker 060255a9d5 Use safe or force workspace delete for cloud backend
3 years ago
Martin Atkins d0a35c60a7 providercache: Ignore lock-mismatching global cache entries
4 years ago
Brandon Croft bd744ad4e9
Unify all sensitive value plan output as "(sensitive value)"
4 years ago
Brandon Croft 076fccd8e7
fix: don't reveal nested attributes with sensitive schema
4 years ago