[datadog_integration_gcp] Remove default value for HostFilters#3489
Open
katherinekim-51 wants to merge 1 commit intomasterfrom
Open
[datadog_integration_gcp] Remove default value for HostFilters#3489katherinekim-51 wants to merge 1 commit intomasterfrom
katherinekim-51 wants to merge 1 commit intomasterfrom
Conversation
d966b16 to
8a105d1
Compare
8a105d1 to
7353064
Compare
domalessi
approved these changes
Feb 3, 2026
ash-ddog
approved these changes
Feb 4, 2026
Contributor
ash-ddog
left a comment
There was a problem hiding this comment.
Couple of nits but LGTM, thanks for the fix! 🙏
| "github.com/terraform-providers/terraform-provider-datadog/datadog/fwprovider" | ||
| ) | ||
|
|
||
| func TestAccDatadogHostFiltersBug(t *testing.T) { |
Contributor
There was a problem hiding this comment.
Can you link the GitHub issue here and add to the PR description? (i.e fixes <issue_link>)
Contributor
There was a problem hiding this comment.
Can you also rename the test to be more explicit about which bug is being fixed?
i.e. TestLegacy_WhenReplacingHostFiltersWithMRC_Succeeds or something like this
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primary reviewer(s):
Description
https://datadoghq.atlassian.net/browse/GCP-3282
Right now, if a user tries to "clear" host filters on update (ie. user omits them because it is deprecated and they moved to using mrcs), the terraform provider returns an inconsistent plan after apply. This fixes that issue
Implementation Details
From a terraform pov, this was happening because we had a default value being set for host filters as "", which defeated the purpose of setting this to computed; so we pass "" in the update, in the server when we merge host_filters with mrcs host_filters becomes computed with "xyz" and to terraform that looks inconsistent. This removes the default value and updates the request body to only be set when the value is known.
Testing Guidelines
Added test and ran cassettes