-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
data-source/external: Omit query attribute map elements with null values
Reference: #194 Reference: #208 The migration to terraform-plugin-framework exposes map values wholly and v2.3.0 handled that transition properly. However, v2.3.1 introduced a subtle change where `query` attribute map elements with null values are now sent with an empty string value, rather than being omitted like previously. Since certain receiving `program` may be dependent on the nuance of `query` values, null element values should continue to omit the element entirely to prevent the introduction of a breaking change. Previously before logic update: ``` === RUN TestDataSource_Query_NullElementValue data_source_test.go:367: Step 1/1 error: Error running pre-apply refresh: exit status 1 Error: External Program Execution Failed with data.external.test, on terraform_plugin_test.tf line 3, in data "external" "test": 3: program = ["/Users/bflad/go/bin/tf-acc-external-data-source"] The data source received an unexpected error while attempting to execute the program. Program: /Users/bflad/go/bin/tf-acc-external-data-source Error Message: I was asked to fail State: exit status 1 --- FAIL: TestDataSource_Query_NullElementValue (0.26s) ```
- Loading branch information
Showing
4 changed files
with
61 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: BUG FIXES | ||
body: 'data-source/external: Prevent regression since v2.3.1 where null `query` element | ||
values would be sent to the program as an empty string' | ||
time: 2023-04-10T13:04:43.615508-04:00 | ||
custom: | ||
Issue: "208" |
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