-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_logic_app_action_http
- omit queries
when not specified
#28447
Conversation
// per the issue https://github.com/hashicorp/terraform-provider-azurerm/issues/28429 | ||
// empty map and nil are different on the service side. | ||
if len(queriesRaw) == 0 { | ||
return nil, nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ziyeqf could you extend the following test case to add a second step where queries
is removed and validate that this works for that case?
terraform-provider-azurerm/internal/services/logic/logic_app_action_http_resource_test.go
Lines 82 to 95 in f6886d7
func TestAccLogicAppActionHttp_queries(t *testing.T) { | |
data := acceptance.BuildTestData(t, "azurerm_logic_app_action_http", "test") | |
r := LogicAppActionHttpResource{} | |
data.ResourceTest(t, r, []acceptance.TestStep{ | |
{ | |
Config: r.queries(data), | |
Check: acceptance.ComposeTestCheckFunc( | |
check.That(data.ResourceName).ExistsInAzure(r), | |
), | |
}, | |
data.ImportStep(), | |
}) | |
} |
Here is the result of extended test case
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ziyeqf LGTM 👍
Community Note
Description
empty map and
nil
have different definitions on the service side, omit it when it's not specified on configuration.PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_logic_app_action_http
- omitqueries
when not specified [azurerm_logic_app_action_http
- omitqueries
when not specified #28447]This is a (please select all that apply):
Related Issue(s)
Fixes #28429
Note
If this PR changes meaningfully during the course of review please update the title and description as required.