Skip to content

Conversation

@tobio
Copy link
Member

@tobio tobio commented Nov 6, 2025

Fixes #813

@tobio tobio requested a review from nick-benoit November 6, 2025 02:56
@tobio tobio self-assigned this Nov 6, 2025
Copy link
Contributor

@nick-benoit nick-benoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Having the resource to manage the state is a cool idea. Just a few optional questions / thoughts.

// waitForDatafeedState waits for a datafeed to reach the desired state
func (r *datafeedResource) waitForDatafeedState(ctx context.Context, datafeedId, desiredState string) error {
var terminalDatafeedStates = map[string]struct{}{
"stopped": {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I wonder if these should be constants defined somewhere?

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good way to add test coverage for datafeed_timeout and timeouts? I guess since they aren't written to any particular resource we read back from ES it might be a bit tricky. It would be nice to have some test coverage though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add ML Datafeed Management

3 participants