terraform/internal/command/testdata
Kristin Laemmert 096010600d
terraform: use hcl.MergeBodies instead of configs.MergeBodies for pro… (#29000)
* terraform: use hcl.MergeBodies instead of configs.MergeBodies for provider configuration

Previously, Terraform would return an error if the user supplied provider configuration via interactive input iff the configuration provided on the command line was missing any required attributes - even if those attributes were already set in config.

That error came from configs.MergeBody, which was designed for overriding valid configuration. It expects that the first ("base") body has all required attributes. However in the case of interactive input for provider configuration, it is perfectly valid if either or both bodies are missing required attributes, as long as the final body has all required attributes. hcl.MergeBodies works very similarly to configs.MergeBodies, with a key difference being that it only checks that all required attributes are present after the two bodies are merged.

I've updated the existing test to use interactive input vars and a schema with all required attributes. This test failed before switching from configs.MergeBodies to hcl.MergeBodies.

* add a command package test that shows that we can still have providers with dynamic configuration + required + interactive input merging

This test failed when buildProviderConfig still used configs.MergeBodies instead of hcl.MergeBodies
2021-06-25 08:48:47 -04:00
..
add commands: `terraform add` (#28874) 2021-06-17 12:08:37 -04:00
apply
apply-config-invalid
apply-destroy-targeted
apply-error
apply-input
apply-input-partial
apply-plan-no-module
apply-replace
apply-sensitive-output
apply-shutdown
apply-targeted
apply-terraform-env
apply-vars
backend-change
backend-change-multi-default-to-single
backend-change-multi-to-multi
backend-change-multi-to-no-default-with-default
backend-change-multi-to-no-default-without-default
backend-change-multi-to-single
backend-change-single-to-single
backend-changed-with-legacy
backend-from-state
backend-inmem-locked
backend-new
backend-new-interp
backend-new-legacy
backend-new-migrate
backend-new-migrate-existing
backend-plan-backend-empty
backend-plan-backend-empty-config
backend-plan-backend-match
backend-plan-backend-mismatch
backend-plan-legacy
backend-plan-legacy-data
backend-plan-local
backend-plan-local-match
backend-plan-local-mismatch-lineage
backend-plan-local-newer
backend-unchanged
backend-unchanged-with-legacy
backend-unset
backend-unset-with-legacy
empty
fmt
get
graph
import-missing-resource-config
import-module-input-variable
import-module-var-file
import-provider
import-provider-aliased
import-provider-datasource
import-provider-implicit
import-provider-invalid
import-provider-remote-state
import-provider-var
import-provider-var-default
import-provider-var-file
init
init-backend
init-backend-config-file
init-backend-config-file-change
init-backend-config-kv
init-backend-empty
init-check-required-version
init-get
init-get-provider-detected-legacy
init-get-provider-invalid-package
init-get-provider-legacy-from-state
init-get-provider-source
init-get-providers
init-internal
init-internal-invalid
init-legacy-provider-cache
init-legacy-rc
init-provider-lock-file
init-provider-lock-file-readonly-add
init-providers-lock
init-required-providers
inmem-backend
login-oauth-server
login-tfe-server
modules
parallelism
plan
plan-emptydiff
plan-invalid
plan-out-backend
plan-out-backend-legacy
plan-provider-input terraform: use hcl.MergeBodies instead of configs.MergeBodies for pro… (#29000) 2021-06-25 08:48:47 -04:00
plan-replace
plan-vars
providers
providers-lock/basic
providers-schema
push
push-backend-new
push-input
push-input-partial
push-no-remote
push-no-upload
push-tfvars
refresh
refresh-empty
refresh-output
refresh-targeted
refresh-unset-var
refresh-var
show
show-json json-output: Omit unchanged resource_drift entries 2021-06-17 15:09:16 -04:00
show-json-sensitive jsonplan and jsonstate: include sensitive_values in state representations (#28889) 2021-06-14 09:19:13 -04:00
show-json-state jsonplan and jsonstate: include sensitive_values in state representations (#28889) 2021-06-14 09:19:13 -04:00
state-list-backend-custom
state-list-backend-default
state-list-nested-modules
state-pull-backend
state-push-bad-lineage
state-push-good
state-push-replace-match
state-push-serial-newer
state-push-serial-older
taint-check-required-version
test-fails
test-passes
validate-invalid
validate-valid
variables
empty-file
statelocker.go