-
Notifications
You must be signed in to change notification settings - Fork 96
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
[Bug] HTTP 400 Bad Request When Creating elasticstack_kibana_security_role #933
Comments
Seeing the same thing here, same symptoms, same error, with version 8.17.0 on docker compose (https://elastic.co/start-local) with provider version 0.11.11: |
Facing the same problem with new elastic cloud deployments. Os: Mac 15.2 & Ubuntu 22.04 |
have same issue with Elastic 8.16.0 & provider: 0.11.6 |
I assume it will be fixed in the linked PR above. |
@biscout42 are we able to close this issue out now? |
Yep, the fix for |
Seems to work fine now on 8.17, thanks for the fix. |
Thanks for verifying. |
Describe the bug
I encountered an error while attempting to create the
elasticstack_kibana_security_role
resource. Although the Kibana role appears to be created successfully, the Terraform resource (elasticstack_kibana_security_role.role
) fails to be created.Upon reviewing the Kibana logs, it seems the issue is caused by a 400 Bad Request response. Specifically:
PUT
request to/api/security/role/developer_role?createOnly=true
is successfully processed.GET
request to/api/security/role/developer_role?createOnly=true
is sent, which results in a 400 Bad Request error from the Kibana server.This behavior suggests that the provider's code is making an unnecessary or improperly formatted
GET
request after the successfulPUT
.I believe the problem is related to the implementation at the following code location:
https://github.com/elastic/terraform-provider-elasticstack/blob/v0.11.11/internal/kibana/role.go#L273
Could you please investigate and provide a solution?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected to able to create Kibana role without any errors.
Debug output
Run
terraform
command withTF_LOG=debug
and provide extended information on TF operations. Please ensure you redact any base64 encoded credentials from your output.eg
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context
It appears that the Kibana Role API (v8) does not support the
createOnly
query parameter in theGET
method.https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-get-security-role-name
The text was updated successfully, but these errors were encountered: