-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
data-source/aws_lambda_invocation: Deprecate result_map attribute
Reference: #9184 Reference: #9190 Reference: #9189 Reference: #13439 Reference: hashicorp/terraform-plugin-sdk#344 Reference: hashicorp/terraform-plugin-sdk#451 The `result_map` attribute was created as a workaround for Terraform 0.11 and earlier not having native JSON decoding abilities. This attribute came with the caveat that it only worked when the JSON was only a flat map of strings, where we otherwise ignore the `(helper/schema.ResourceData).Set()` error and instead return a warning log. In Terraform Plugin SDK v2, this error will now panic in the acceptance testing as these errors are generally indicative of resource bugs, which is unavoidable in this case. Practitioners should instead opt for the Terraform 0.12 and later `jsondecode()` function against the `result` attribute, which can handle much more arbitrary JSON structures. This has been documented in the `aws_lambda_invocation` data source for awhile now. For JSON structures not compliant with Terraform's JSON decoding, the `result` attribute's string value can still be passed to other processing logic, such as calling the `jq` tool.
- Loading branch information
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters