terraform-provider-vcd icon indicating copy to clipboard operation
terraform-provider-vcd copied to clipboard

Post SDK 2.x adjustments

Open dataclouder opened this issue 4 years ago • 0 comments

After upgrading to terraform SDK 2.1 (PR #576), we have several tasks to complete, mostly to react to deprecated functions

  1. 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

  2. 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

  3. function GetOkExist is deprecated and should be replaced before the next version of SDK.

  4. 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.

dataclouder avatar Oct 28 '20 12:10 dataclouder