terraform/helper
Martin Atkins 7f860dc83e helper/schema: Schema.SkipCoreTypeCheck flag
When running in v0.12-and-higher mode, this will cause the SDK to report
the type of the attribute as "any", effectively skipping type checking
on the Core side altogether and checking only in the SDK and provider
code.

The practical impact of this is to restore the v0.11-style checking
behavior of allowing object values to be missing certain attributes as
long as they are marked as optional in the schema. The SDK can do this
because it uses a unified schema model for both object values and nested
blocks, while Terraform Core only supports the idea of "optional" when
talking about attributes in nested blocks.

This is a continuation of the pile of workarounds that also includes
the ConfigMode and AsSingle fields, allowing providers to selectively opt
out of new v0.12 behaviors in situations where they conflict with
decisions made in the design of the providers in our old world where
Terraform Core delegated _all_ validation to providers.

This is designed as an opt-in so that we can limit its impact only to
specific cases where it's needed and minimize the risk of regressions
elsewhere. Providers should use this sparingly only in situations where
prevailing usage disagrees with the new expectations of Terraform Core in
v0.12.

This commit only adds the flag, and does not implement any behavior for it
yet. That means this commit can exist in both the v0.11 and v0.12
codebases, allowing for API compatibility. A subsequent commit for v0.12
(not included in v0.11) will then implement this behavior.
2019-03-21 15:19:59 -07:00
..
acctest Fix swallowed err in acctest package 2017-07-19 16:24:41 -07:00
config Fix failing tests 2014-10-09 21:29:21 -07:00
copy config/module: use the raw source as part of the key 2016-09-30 10:44:46 -07:00
customdiff helper/customdiff: Helper functions for CustomizeDiff 2017-12-18 10:38:20 -08:00
didyoumean helper/didyoumean: helper library for "Did you mean ...? suggestions 2017-10-16 17:50:57 -07:00
diff helper/diff: handle unknownvariablevalue 2016-11-09 14:28:16 -08:00
encryption provider/aws: Extract helper/encryption library 2016-12-06 14:24:21 -06:00
experiment terraform: default shadow to false 2017-02-06 18:02:32 -08:00
hashcode hashcode: "Strings" function for hashing slices of strings 2017-10-20 14:54:23 -07:00
hilmapstructure core: Defeat backward compatibilty in mapstructure 2016-06-08 18:38:41 +01:00
logging pretty-print json in http requests/responses 2018-08-09 12:27:58 -07:00
mutexkv provider/aws: serialize SG rule access to fix race condition 2015-11-18 12:39:59 -06:00
pathorcontents helper/pathorcontents: Skip one test when root 2018-09-19 11:38:51 -05:00
plugin helper/schema: Implementation of the AsSingle mechanism 2019-03-14 15:36:15 -07:00
resource grammatical updates to comments and docs (#20195) 2019-03-21 14:05:41 -07:00
schema helper/schema: Schema.SkipCoreTypeCheck flag 2019-03-21 15:19:59 -07:00
shadow Make sure shadow.closeWalker doesn't copy Mutexes 2017-07-07 11:20:54 -04:00
signalwrapper providers/azurerm: cancellable storage account creation 2016-08-15 21:12:32 -07:00
slowmessage helper/slowmessage 2017-02-14 09:27:23 -08:00
structure helper/structure: More cases for NormalizeJsonString tests 2018-01-17 15:53:38 -08:00
validation helper/validation: Add Any() SchemaValidateFunc 2018-10-18 20:58:53 -04:00
variables command/init: backend-config accepts key=value pairs 2017-03-16 23:27:05 -07:00
wrappedreadline command: split out and tag code so compilation works on Solaris 2016-11-14 00:32:01 -08:00
wrappedstreams helper/wrappedstreams: get original console input/output on Windows 2016-11-21 10:44:01 -08:00
README.md dos2unix 2014-07-28 10:43:00 -07:00

README.md

Helper Libraries

This folder contains helper libraries for Terraform plugins. A running joke is that this is "Terraform standard library" for plugins. The goal of the packages in this directory are to provide high-level helpers to make it easier to implement the various aspects of writing a plugin for Terraform.