Skip to content
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

fix: elastic indices datasource boolean parsing #842

Merged

Conversation

jdesnoes
Copy link
Contributor

@jdesnoes jdesnoes commented Oct 14, 2024

Hello,

A little fix on the elastic indices datasource. When parsing boolean settings the following error could occur:

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: failed to convert setting to bool
│ 
│   with data.elasticstack_elasticsearch_indices.existing_indices["my-indice"],
│   on main.tf line 56, in data "elasticstack_elasticsearch_indices" "existing_indices":
│   56: data "elasticstack_elasticsearch_indices" "existing_indices" {
│ 
│ expected setting to be a bool but got %!t(string=false)

@tobio I think a fast review could let it be included in the 0.11.9 version.

Thanks.

Copy link
Member

@tobio tobio left a comment

Choose a reason for hiding this comment

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

Thanks @jdesnoes, are you able to add a changelog entry here?

internal/elasticsearch/index/indices/models.go Outdated Show resolved Hide resolved
@jdesnoes
Copy link
Contributor Author

@tobio it looks there is failing test step on 8.8.2 but I don't see anything related to the changes I did with this PR.
I guess everything should be OK if we try to run it again?

@tobio tobio merged commit 1fa3e9b into elastic:main Oct 15, 2024
20 checks passed
@tobio
Copy link
Member

tobio commented Oct 15, 2024

Thanks for coming back to fix this up!

@jdesnoes jdesnoes deleted the fix-elastic-indices-datasource-bool-parse branch October 15, 2024 13:27
kjwardy pushed a commit to kjwardy/terraform-provider-elasticstack that referenced this pull request Oct 21, 2024
* fix: Elastic Indices datasource boolean parsing

* fix: Elastic Indices datasource boolean parsing
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.

2 participants