-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add multi-tenancy support #184
Conversation
Signed-off-by: Philipp Reinke <[email protected]>
Could you please approve the workflow again ^^. A formatter was complaining about missing whitespaces in a Terraform snippet and I amended a fix for that. |
When I am testing using this docker compose file, https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/#sample-docker-composeyml I have used the following Terraform code
Is there any additional configuration required? |
Hi @rblcoder :),
When I use your exact code snippets but |
@PhilippReinke Should the references to dashboardSavedObjectMeta in resource_opensearch_dashboard_object_test.go, The resource is successfully created now with this modification, though the Saved Objects / Edit Visualization fields are not populated with the data which is specified in the Terraform code. |
@rblcoder It doesn't work because you cannot have a visualization without index-pattern. By default you've got an index of the form "security-auditlog-*" and the following example shows how to then define a visualization for it.
As soon as there is something wrong with the definition of the object OpenSearch Dashboard won't display it correctly. In your example above the Dashboard shows no data but if you check the object via Dev Tools with
you will see that object actually has been created with the values. Kibana has a Saved objects API but there is non documented for OpenSearch Dashboard. Probably, this would be the better approach to manage Dashboard objects. However, as long as the API is not documented this PR offers a way to create objects per tenant. |
Signed-off-by: Philipp Reinke <[email protected]>
Thank you @PhilippReinke for the complete and detailed example. |
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.
The changes work for me.
Thanks for your contribution @PhilippReinke and thanks for reviewing @rblcoder. |
Description
A
tenant_name
argument has been added to theopensearch_dashboard_object
resource. It's important to note that the global tenant is referenced by an empty string "" which is also the default value. Further,opensearch_dashboard_object
has been refactored_id
within the body changes. Previously, this did not work properly and a copy of the object was created without destroying the old one.Note that using "global_tenant" as tenant creates an object in OpenSearch but it won't be visible in the UI. Hence, one needs to use "" to reference the global tenant.
Issues Resolved
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.