Skip to content

Conversation

Holi0317
Copy link
Contributor

@Holi0317 Holi0317 commented Jul 18, 2024

The data source is not handling pagination at all. This fix the case when kibana server got more than 20 fleet enrollment tokens and the provider is not paginating the result when searching for a match.

Fetching all tokens case (empty policyID in input) is still not handled. Just trying to push a fix with minimum effort for now.

Partially fixes #528.

The data source is not handling pagination at all. This fix the case
when kibana server got more than 20 fleet enrollment tokens and the
provider is not paginating the result when searching for a match.

Fetching all tokens case (empty policyID in input) is still not handled.
Just trying to push a fix with minimum effort for now.

Partially fixes elastic#528.
Copy link

cla-checker-service bot commented Jul 18, 2024

💚 CLA has been signed

@Holi0317
Copy link
Contributor Author

Holi0317 commented Jul 18, 2024

I tried to run make docker-testacc but a lot of unrelated tests are failing. The second run just hangs.

Tried to build the provider and run against my terraform configuration and this fixes the empty array issue.

@tobio
Copy link
Member

tobio commented Jul 24, 2024

@Holi0317 are you able to add an entry to CHANGELOG.md for this one?

@Holi0317
Copy link
Contributor Author

@tobio Updated changelog (and fix a formatting issue in older version entry)

Also updating the name for the function in fleet.go. Maybe this GetEnrollmentTokensByPolicy is more descriptive.

@tobio
Copy link
Member

tobio commented Jul 25, 2024

Thanks for fixing this one up @Holi0317, it's very much appreciated.

I tried to run make docker-testacc but a lot of unrelated tests are failing. The second run just hangs.

Sorry these didn't work out for you, I've mostly seen the local tests behave pretty well. If you were able to grab the output of make docker-testacc and open a new issue we can take a look at making these more reliable.

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.

[Bug] elasticstack_fleet_enrollment_tokens Data Source not collecting Policy Tokens
2 participants