-
Notifications
You must be signed in to change notification settings - Fork 380
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
[datadog_apm_retention_filter] Support updating default retention filters #2370
base: master
Are you sure you want to change the base?
[datadog_apm_retention_filter] Support updating default retention filters #2370
Conversation
c1d4793
to
8c6d657
Compare
var id string | ||
var filterName string | ||
for _, rfa := range resp.Data { | ||
if string(rfa.Attributes.GetFilterType()) == state.FilterType.ValueString() { |
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.
Why are we matching my filter type here? Can't we have multiple default pipelines with the same type?
func (r *ApmRetentionFilterResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) { | ||
var state ApmRetentionFilterModel | ||
response.Diagnostics.Append(request.Plan.Get(ctx, &state)...) | ||
if response.Diagnostics.HasError() { | ||
return | ||
} | ||
if state.FilterType.ValueString() != "spans-sampling-processor" { |
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.
Can default retention rules not have type spans-sampling-processor
? I see Synthetics Default rule has definition:
{
"id": "",
"name": "Synthetics Default",
"enabled": false,
"meta": {
"description": "Get started with Synthetic Monitoring",
"tags": [
"dd.default:true",
"dd.feature:synthetics"
]
},
"type": "spans-sampling-processor"
}
This PR fixes an issue where users are unable to define default retention filters as resources, this PR updates
datadog_apm_retention_filter
resource to allow defining those filters in terraform.this PR depends on https://github.com/DataDog/datadog-api-spec/pull/2757 to be released