Rupa Lahiri
Rupa Lahiri
@atammy-narmi Could you please create an issue and specify examples so that I can test and review the PR?
@atammy-narmi @prudhvigodithi Can the code for normalizeMonitorTriggers be as follows? I checked, the tests are also passing. ``` func normalizeMonitorTriggers(triggers []interface{}) { // trigger_types := []string{"alerting_trigger", "anomaly_detector_trigger", "bucket_level_trigger", "chained_alert_trigger", "document_level_trigger",...
@atammy-narmi I agree that the code above is not robust. Adding links for sample json documents if anyone going through this issue later would like to refer - https://opensearch.org/docs/latest/observing-your-data/alerting/per-cluster-metrics-monitors/#painless-triggers https://opensearch.org/docs/latest/observing-your-data/alerting/composite-monitors/#example-request
@atammy-narmi As mentioned in https://github.com/opensearch-project/terraform-provider-opensearch/pull/50#discussion_r1462693542, can you try to avoid hard-coding the trigger types? Can you create a REST API to get list of trigger types? https://github.com/opensearch-project/alerting/issues/1422
@kcorelight https://github.com/opensearch-project/terraform-provider-opensearch/blob/main/provider/resource_opensearch_roles_mapping.go is calling _[plugins/_security/api/rolesmapping/](https://opensearch.org/docs/latest/security/access-control/api/) PUT _plugins/_security/api/rolesmapping/ will replace the existing role mapping, right? (https://opensearch.slack.com/archives/D060NNV468H/p1707909374961869) You would also need to specify any existing users and backend_roles for the role mapping...
I have posted a question in the OpenSearch Community https://forum.opensearch.org/t/differences-between-legacy-template-and-index-template/17831
@prudhvigodithi When I try to call ```mapping, err := osClient.GetMapping().Index(index).Do(ctx)``` err shows ```elastic: Error 400 (Bad Request)``` Variable index contains the name of the index.
rollover_alias is a [computed attribute](https://github.com/opensearch-project/terraform-provider-opensearch/blob/main/provider/resource_opensearch_index.go). https://discuss.hashicorp.com/t/computed-attributes-and-plan-modifiers/45830/14#:~:text=The%20framework%20will%20automatically%20mark,prevent%20Terraform%20data%20consistency%20errors. says The framework will automatically mark Computed attributes with null configuration as unknown (known after apply) during the plan, which is intentional to prevent...
Also please try setting number_of_shards and number_of_replicas as follows that is as separate key/value pairs instead of within settings, documentation https://registry.terraform.io/providers/jamesanto/opensearch/latest/docs/resources/index - ``` resource "opensearch_index" "index" { name = "test-logs-000001"...
@prudhvigodithi I thought of adding the following to README.md to generate documentation `go generate ./... ` as per https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-documentation-generation