diff --git a/docs/index.md b/docs/index.md index c8dbf13..1ec81a8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -72,22 +72,22 @@ EOF - `aws_profile` (String) The AWS profile for use with AWS OpenSearch Service domains - `aws_region` (String) The AWS region for use in signing of AWS OpenSearch requests. Must be specified in order to use AWS URL signing with AWS OpenSearch endpoint exposed on a custom DNS domain. - `aws_secret_key` (String) The secret key for use with AWS OpenSearch Service domains -- `aws_signature_service` (String) AWS service name used in the credential scope of signed requests to opensearch. +- `aws_signature_service` (String) AWS service name used in the credential scope of signed requests to OpenSearch. - `aws_token` (String) The session token for use with AWS OpenSearch Service domains - `cacert_file` (String) A Custom CA certificate -- `client_cert_path` (String) A X509 certificate to connect to opensearch -- `client_key_path` (String) A X509 key to connect to opensearch -- `healthcheck` (Boolean) Set the client healthcheck option for the opensearch client. Healthchecking is designed for direct access to the cluster. -- `host_override` (String) If provided, sets the 'Host' header of requests and the 'ServerName' for certificate validation to this value. See the documentation on connecting to opensearch via an SSH tunnel. +- `client_cert_path` (String) A X509 certificate to connect to OpenSearch +- `client_key_path` (String) A X509 key to connect to OpenSearch +- `healthcheck` (Boolean) Set the client healthcheck option for the OpenSearch client. Healthchecking is designed for direct access to the cluster. +- `host_override` (String) If provided, sets the 'Host' header of requests and the 'ServerName' for certificate validation to this value. See the documentation on connecting to OpenSearch via an SSH tunnel. - `insecure` (Boolean) Disable SSL verification of API calls -- `opensearch_version` (String) opensearch Version -- `password` (String) Password to use to connect to opensearch using basic auth -- `proxy` (String) Proxy URL to use for requests to opensearch. -- `sign_aws_requests` (Boolean) Enable signing of AWS opensearch requests. The `url` must refer to AWS ES domain (`*..es.amazonaws.com`), or `aws_region` must be specified explicitly. -- `sniff` (Boolean) Set the node sniffing option for the opensearch client. Client won't work with sniffing if nodes are not routable. +- `opensearch_version` (String) OpenSearch Version +- `password` (String) Password to use to connect to OpenSearch using basic auth +- `proxy` (String) Proxy URL to use for requests to OpenSearch. +- `sign_aws_requests` (Boolean) Enable signing of AWS OpenSearch requests. The `url` must refer to AWS ES domain (`*..es.amazonaws.com`), or `aws_region` must be specified explicitly. +- `sniff` (Boolean) Set the node sniffing option for the OpenSearch client. Client won't work with sniffing if nodes are not routable. - `token` (String) A bearer token or ApiKey for an Authorization header, e.g. Active Directory API key. - `token_name` (String) The type of token, usually ApiKey or Bearer -- `username` (String) Username to use to connect to opensearch using basic auth +- `username` (String) Username to use to connect to OpenSearch using basic auth - `version_ping_timeout` (Number) Version ping timeout in seconds ## Authentication diff --git a/docs/resources/index.md b/docs/resources/index.md index c6daeb2..2e4001d 100644 --- a/docs/resources/index.md +++ b/docs/resources/index.md @@ -21,7 +21,7 @@ resource "opensearch_index" "test-simple-index" { mappings = < opensearch_ism_policy_mapping is deprecated in OpenSearch 1.x please use the opensearch_ism_policy resource and specify the ism_template attribute in the policies instead. --- -!> **NOTE:** `opensearch_ism_policy_mapping` is deprecated in Opensearch 1.x please use the `opensearch_ism_policy` resource and specify the `ism_template` attribute in the policies instead. - # opensearch_ism_policy_mapping (Resource) Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details. +!> `opensearch_ism_policy_mapping` is deprecated in OpenSearch 1.x please use the `opensearch_ism_policy` resource and specify the `ism_template` attribute in the policies instead. + ## Example Usage ```terraform diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 66372f9..317dccc 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -8,12 +8,16 @@ resource "opensearch_index_template" "template_1" { name = "template_1" body = <.es.amazonaws.com`), or `aws_region` must be specified explicitly.", + Description: "Enable signing of AWS OpenSearch requests. The `url` must refer to AWS ES domain (`*..es.amazonaws.com`), or `aws_region` must be specified explicitly.", }, "aws_signature_service": { Type: schema.TypeString, Optional: true, Default: "es", - Description: "AWS service name used in the credential scope of signed requests to opensearch.", + Description: "AWS service name used in the credential scope of signed requests to OpenSearch.", }, "opensearch_version": { Type: schema.TypeString, Optional: true, Default: "", - Description: "opensearch Version", + Description: "OpenSearch Version", }, // version_ping_timeout is the time the ping to check the cluster - // version waits for a response from opensearch on startup, e.g. when + // version waits for a response from OpenSearch on startup, e.g. when // creating a provider. "version_ping_timeout": { Type: schema.TypeInt, @@ -215,12 +215,12 @@ func Provider() *schema.Provider { Type: schema.TypeString, Optional: true, Default: "", - Description: "If provided, sets the 'Host' header of requests and the 'ServerName' for certificate validation to this value. See the documentation on connecting to opensearch via an SSH tunnel.", + Description: "If provided, sets the 'Host' header of requests and the 'ServerName' for certificate validation to this value. See the documentation on connecting to OpenSearch via an SSH tunnel.", }, "proxy": { Type: schema.TypeString, Optional: true, - Description: "Proxy URL to use for requests to opensearch.", + Description: "Proxy URL to use for requests to OpenSearch.", }, }, @@ -421,7 +421,7 @@ func getClient(conf *ProviderConf) (*elastic7.Client, error) { conf.flavor = OpenSearch } } else if conf.flavor == Unknown || conf.osVersion < "1.0.0" { - return nil, fmt.Errorf("opensearch version %s is older than 1.0.0 and is not supported, flavor: %v.", conf.osVersion, conf.flavor) + return nil, fmt.Errorf("OpenSearch version %s is older than 1.0.0 and is not supported, flavor: %v.", conf.osVersion, conf.flavor) } return client, nil diff --git a/provider/resource_opensearch_index_template.go b/provider/resource_opensearch_index_template.go index 69f5e37..65939b2 100644 --- a/provider/resource_opensearch_index_template.go +++ b/provider/resource_opensearch_index_template.go @@ -13,7 +13,7 @@ import ( func resourceOpensearchIndexTemplate() *schema.Resource { return &schema.Resource{ - Description: "Provides an Opensearch index template resource.", + Description: "Provides an OpenSearch index template resource.", Create: resourceOpensearchIndexTemplateCreate, Read: resourceOpensearchIndexTemplateRead, Update: resourceOpensearchIndexTemplateUpdate, diff --git a/provider/resource_opensearch_ism_policy.go b/provider/resource_opensearch_ism_policy.go index 3923140..23e20ad 100644 --- a/provider/resource_opensearch_ism_policy.go +++ b/provider/resource_opensearch_ism_policy.go @@ -79,7 +79,7 @@ func resourceOpensearchISMPolicyRead(d *schema.ResourceData, m interface{}) erro if err != nil { if elastic6.IsNotFound(err) || elastic7.IsNotFound(err) { - log.Printf("[WARN] Opensearch Policy (%s) not found, removing from state", d.Id()) + log.Printf("[WARN] OpenSearch Policy (%s) not found, removing from state", d.Id()) d.SetId("") return nil } diff --git a/provider/resource_opensearch_ism_policy_mapping.go b/provider/resource_opensearch_ism_policy_mapping.go index c8fc142..f35af17 100644 --- a/provider/resource_opensearch_ism_policy_mapping.go +++ b/provider/resource_opensearch_ism_policy_mapping.go @@ -53,7 +53,7 @@ var openDistroISMPolicyMappingSchema = map[string]*schema.Schema{ func resourceOpenSearchISMPolicyMapping() *schema.Resource { return &schema.Resource{ - Description: "Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details.", + Description: "Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details.\n\n!> `opensearch_ism_policy_mapping` is deprecated in OpenSearch 1.x please use the `opensearch_ism_policy` resource and specify the `ism_template` attribute in the policies instead.", Create: resourceOpensearchOpenDistroISMPolicyMappingCreate, Read: resourceOpensearchOpenDistroISMPolicyMappingRead, Update: resourceOpensearchOpenDistroISMPolicyMappingUpdate, @@ -66,7 +66,7 @@ func resourceOpenSearchISMPolicyMapping() *schema.Resource { Create: schema.DefaultTimeout(5 * time.Minute), Update: schema.DefaultTimeout(5 * time.Minute), }, - DeprecationMessage: "opensearch_ism_policy_mapping is deprecated in Opensearch 1.x please use the opensearch_ism_policy resource and specify the ism_template attribute in the policies instead.", + DeprecationMessage: "opensearch_ism_policy_mapping is deprecated in OpenSearch 1.x please use the opensearch_ism_policy resource and specify the ism_template attribute in the policies instead.", } } diff --git a/provider/resource_opensearch_sm_policy_test.go b/provider/resource_opensearch_sm_policy_test.go index b3ce52c..e51fc90 100644 --- a/provider/resource_opensearch_sm_policy_test.go +++ b/provider/resource_opensearch_sm_policy_test.go @@ -24,7 +24,7 @@ func TestAccOpensearchSMPolicy(t *testing.T) { testAccPreCheck(t) if !allowed { - t.Skip("OpenSearch Snapshot Management only supported on Opensearch >= 2.1") + t.Skip("OpenSearch Snapshot Management only supported on OpenSearch >= 2.1") } }, Providers: testAccOpendistroProviders,