-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Module version
v0.4.2
Description
If/when block support is implemented (see also: #85), there may need to be an investigation into how Computed
only blocks (or more technically accurate, where all block attributes are Computed
only) are documented or otherwise supported by the framework.
In Terraform Plugin SDK version 2, there is special logic that automatically applied to Computed
-only blocks that converts them into attributes:
While this has its own issues (see also: hashicorp/terraform-plugin-sdk#201) and likely would not be done in this framework since its design tends to avoid such unexpected abstraction/behavior changes, something may need to be done to prevent Terraform CLI "inconsistent results after apply" errors, if they occur, whether that be additional documentation, helpers, or other handling by the framework.
Definition of Done
terraform-provider-corner may be the most appropriate place to capture end-to-end testing scenarios, since any potential error would occur in Terraform CLI.
- Create a resource schema that contains a list block with
Computed
only attributes (replicate for set blocks as well)- Verify not setting state does not return an error
- Verify setting 1 list element with attributes does not return an error
- Verify setting 2+ list elements with attributes does not return an error
-
- Create a resource schema that contains a list block with a list block (nested block) with
Computed
only attributes (replicate for nested set blocks as well) - Verify not setting state does not return an error
- Verify setting 1 list element with attributes does not return an error
- Verify setting 2+ list elements with attributes does not return an error
- Create a resource schema that contains a list block with a list block (nested block) with
- If an error is returned in any of these cases, framework maintainers determine next course of action and create further issues as appropriate for documentation, helpers, other handling in the framework, etc.