terraform/builtin/providers
Martin Atkins bdcac8792d plugin: Use correct schema when marshaling imported resource objects
Previously we were using the type name requested in the import to select
the schema, but a provider is free to return additional objects of other
types as part of an import result, and so it's important that we perform
schema selection separately for each returned object.

If we don't do this, we get confusing downstream errors where the
resulting object decodes to the wrong type and breaks various invariants
expected by Terraform Core.

The testResourceImportOther test in the test provider didn't catch this
previously because it happened to have an identical schema to the other
resource type being imported. Now the schema is changed and also there's
a computed attribute we can set as part of the refresh phase to make sure
we're completing the Read call properly during import. Refresh was working
correctly, but we didn't have any tests for it as part of the import flow.
2019-02-01 15:22:54 -08:00
..
terraform there is always an implied workspace of "default" 2018-12-20 17:17:11 -05:00
test plugin: Use correct schema when marshaling imported resource objects 2019-02-01 15:22:54 -08:00
README remove builtin providers 2017-06-12 13:42:06 -04:00

README

providers moved to github.com/terraform-providers