terraform-provider-vcd
terraform-provider-vcd copied to clipboard
Post SDK 2.x adjustments
After upgrading to terraform SDK 2.1 (PR #576), we have several tasks to complete, mostly to react to deprecated functions
-
Update Create, Read, Update, Delete, and Import functions (currently deprecated) to use the new ones with context enabled. See: https://www.terraform.io/docs/extend/guides/v2-upgrade-guide.html#more-support-for-context-context
-
Replace existing ValidateFunc with the ones supporting Diagnostics. See: https://www.terraform.io/docs/extend/guides/v2-upgrade-guide.html#deprecation-of-helper-schema-schemavalidatefunc
-
function
GetOkExist
is deprecated and should be replaced before the next version of SDK. -
Rewrite tests that refer to the same entity both as resource and data source in the same configuration. Using them with SDK 2.x causes an error. Current workaround is to add an extra
depends_on
in the data source. The clean implementation is to create the resource in one test step and use the data source in the next one.