diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ca021e5..1835ce558 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ - Add the `alerts_filter` field to the `actions` in the Create Rule API ([#774](https://github.com/elastic/terraform-provider-elasticstack/pull/774)) - Add the `alert_delay` field to the Create Rule API ([#715](https://github.com/elastic/terraform-provider-elasticstack/pull/715)) - Add support for data_stream `lifecycle` template settings ([#724](https://github.com/elastic/terraform-provider-elasticstack/pull/724)) -- Fix a provider panic when `elasticstack_kibana_action_connector` reads a non-existant connector ([#729](https://github.com/elastic/terraform-provider-elasticstack/pull/729)) +- Fix a provider panic when `elasticstack_kibana_action_connector` reads a non-existent connector ([#729](https://github.com/elastic/terraform-provider-elasticstack/pull/729)) - Add support for `remote_indicies` to `elasticstack_elasticsearch_security_role` & `elasticstack_kibana_security_role` (#723)[https://github.com/elastic/terraform-provider-elasticstack/pull/723] - Fix error handling in `elasticstack_kibana_import_saved_objects` ([#738](https://github.com/elastic/terraform-provider-elasticstack/pull/738)) - Remove `space_id` parameter from private locations to fix inconsistent state for `elasticstack_kibana_synthetics_private_location` `space_id` ([#733](https://github.com/elastic/terraform-provider-elasticstack/pull/733)) diff --git a/docs/guides/elasticstack-and-cloud.md b/docs/guides/elasticstack-and-cloud.md index f87a79470..0ff1cf94b 100644 --- a/docs/guides/elasticstack-and-cloud.md +++ b/docs/guides/elasticstack-and-cloud.md @@ -176,4 +176,4 @@ resource "elasticstack_elasticsearch_security_user" "monitoring_user" { } ``` -Note that resources can be targed to certain deployments using the `provider` attribute. +Note that resources can be targeted to certain deployments using the `provider` attribute. diff --git a/docs/index.md b/docs/index.md index aacc7bb97..63f49df10 100644 --- a/docs/index.md +++ b/docs/index.md @@ -90,13 +90,13 @@ For Elasticsearch resources, you can use the following variables: - `ELASTICSEARCH_BEARER_TOKEN` - A bearer token to use for Elasticsearch authorization header. - `ELASTICSEARCH_ES_CLIENT_AUTHENTICATION` - The shared secret for the Elasticsearch authorization header. -Kibana resources will re-use any Elasticsearch credentials specified, these may be overridden with the following variables: +Kibana resources will reuse any Elasticsearch credentials specified, these may be overridden with the following variables: - `KIBANA_USERNAME` - The username to use for Kibana authentication - `KIBANA_PASSWORD` - The password to use for Kibana authentication - `KIBANA_ENDPOINT` - The Kibana host to connect to - `KIBANA_API_KEY` - An Elasticsearch API key to use instead of `KIBANA_USERNAME` and `KIBANA_PASSWORD` -Fleet resources will re-use any Kibana or Elasticsearch credentials specified, these may be overridden with the following variables: +Fleet resources will reuse any Kibana or Elasticsearch credentials specified, these may be overridden with the following variables: - `FLEET_USERNAME` - The username to use for Kibana authentication - `FLEET_PASSWORD` - The password to use for Kibana authentication - `FLEET_ENDPOINT` - The Kibana host to connect to. ** Note the Fleet API is hosted within Kibana. This must be a Kibana HTTP host ** diff --git a/generated/connectors/README.md b/generated/connectors/README.md index e4e3c852d..ea08e4a4b 100644 --- a/generated/connectors/README.md +++ b/generated/connectors/README.md @@ -5,7 +5,7 @@ - added `.slack_api` as a possible value for `connector_types`; - added mapping section for discriminator field in `POST` `/s/{spaceId}/api/actions/connector`; - added explicit object definitions for `400`, `401` and `404` errors (`oapi-codegen` doesn't generate proper code for embedded anonymous objects in some cases) - `bad_request_error`, `authorization_error` and `object_not_found_error`; -- added missing `oneOf` types in `requestBody` for `PUT` `/s/{spaceId}/api/actions/connector/{connectorId}` - the original `bundled.yaml` misses some connector types in the `PUT` `requestBody` defintion: +- added missing `oneOf` types in `requestBody` for `PUT` `/s/{spaceId}/api/actions/connector/{connectorId}` - the original `bundled.yaml` misses some connector types in the `PUT` `requestBody` definition: - `update_connector_request_email`; - `update_connector_request_pagerduty`; - `update_connector_request_servicenow_sir`; diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index f93c47be6..cf639209a 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -892,7 +892,7 @@ components: type: string description: The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. create_connector_request_cases_webhook: - title: Create Webhook - Case Managment connector request + title: Create Webhook - Case Management connector request description: | The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. type: object @@ -2466,7 +2466,7 @@ components: .webhook: '#/components/schemas/connector_response_properties_webhook' .xmatters: '#/components/schemas/connector_response_properties_xmatters' update_connector_request_cases_webhook: - title: Update Webhook - Case Managment connector request + title: Update Webhook - Case Management connector request type: object required: - config diff --git a/generated/fleet/fleet.gen.go b/generated/fleet/fleet.gen.go index 135643e8d..ee78307f6 100644 --- a/generated/fleet/fleet.gen.go +++ b/generated/fleet/fleet.gen.go @@ -3761,7 +3761,7 @@ type UpdatePackagePolicyResponse struct { HTTPResponse *http.Response JSON200 *struct { Item PackagePolicy `json:"item"` - Sucess bool `json:"sucess"` + Success bool `json:"success"` } JSON400 *Error } @@ -4858,7 +4858,7 @@ func ParseUpdatePackagePolicyResponse(rsp *http.Response) (*UpdatePackagePolicyR case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Item PackagePolicy `json:"item"` - Sucess bool `json:"sucess"` + Success bool `json:"success"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err diff --git a/generated/slo-spec.yml b/generated/slo-spec.yml index 5529502e2..7c4fdd859 100644 --- a/generated/slo-spec.yml +++ b/generated/slo-spec.yml @@ -1077,7 +1077,7 @@ components: example: 0.02 consumed: type: number - description: The error budget consummed, as a percentage of the initial value. + description: The error budget consumed, as a percentage of the initial value. example: 0.8 remaining: type: number diff --git a/generated/slo/api/openapi.yaml b/generated/slo/api/openapi.yaml index 33bc46518..0b09d667e 100644 --- a/generated/slo/api/openapi.yaml +++ b/generated/slo/api/openapi.yaml @@ -949,7 +949,7 @@ components: example: 0.02 type: number consumed: - description: "The error budget consummed, as a percentage of the initial\ + description: "The error budget consumed, as a percentage of the initial\ \ value." example: 0.8 type: number diff --git a/generated/slo/docs/ErrorBudget.md b/generated/slo/docs/ErrorBudget.md index 480bc5915..7731d2e9b 100644 --- a/generated/slo/docs/ErrorBudget.md +++ b/generated/slo/docs/ErrorBudget.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Initial** | **float64** | The initial error budget, as 1 - objective | -**Consumed** | **float64** | The error budget consummed, as a percentage of the initial value. | +**Consumed** | **float64** | The error budget consumed, as a percentage of the initial value. | **Remaining** | **float64** | The error budget remaining, as a percentage of the initial value. | **IsEstimated** | **bool** | Only for SLO defined with occurrences budgeting method and calendar aligned time window. | diff --git a/generated/slo/model_error_budget.go b/generated/slo/model_error_budget.go index d7d8e6b6d..9d595e2c3 100644 --- a/generated/slo/model_error_budget.go +++ b/generated/slo/model_error_budget.go @@ -21,7 +21,7 @@ var _ MappedNullable = &ErrorBudget{} type ErrorBudget struct { // The initial error budget, as 1 - objective Initial float64 `json:"initial"` - // The error budget consummed, as a percentage of the initial value. + // The error budget consumed, as a percentage of the initial value. Consumed float64 `json:"consumed"` // The error budget remaining, as a percentage of the initial value. Remaining float64 `json:"remaining"` diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index 3f9865d9d..f43736661 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -426,7 +426,7 @@ func buildKibanaClient(cfg config.Client) (*kibana.Client, error) { } if logging.IsDebugOrHigher() { - // Don't use kib.Client.SetDebug() here as we re-use the http client within the OpenAPI generated clients + // Don't use kib.Client.SetDebug() here as we reuse the http client within the OpenAPI generated clients transport, err := kib.Client.Transport() if err != nil { return nil, err diff --git a/internal/clients/config/fleet_test.go b/internal/clients/config/fleet_test.go index 914801714..88aa9182e 100644 --- a/internal/clients/config/fleet_test.go +++ b/internal/clients/config/fleet_test.go @@ -44,7 +44,7 @@ func Test_newFleetConfigFromSDK(t *testing.T) { }, }, { - name: "should use the provided config optios", + name: "should use the provided config options", args: func() args { kibanaCfg := kibanaConfig{ Address: "example.com/kibana", diff --git a/internal/clients/config/kibana.go b/internal/clients/config/kibana.go index 9fc532cd9..9daefb2c4 100644 --- a/internal/clients/config/kibana.go +++ b/internal/clients/config/kibana.go @@ -40,7 +40,7 @@ func newKibanaConfigFromSDK(d *schema.ResourceData, base baseConfig) (kibanaConf } if endpoints, ok := kibConfig["endpoints"]; ok && len(endpoints.([]interface{})) > 0 { - // We're curently limited by the API to a single endpoint + // We're currently limited by the API to a single endpoint if endpoint := endpoints.([]interface{})[0]; endpoint != nil { config.Address = endpoint.(string) } diff --git a/internal/clients/kibana/alerting.go b/internal/clients/kibana/alerting.go index 5a1fe698a..c30726c10 100644 --- a/internal/clients/kibana/alerting.go +++ b/internal/clients/kibana/alerting.go @@ -315,5 +315,5 @@ func DeleteAlertingRule(ctx context.Context, apiClient *clients.ApiClient, ruleI } defer res.Body.Close() - return utils.CheckHttpError(res, "Unabled to delete alerting rule") + return utils.CheckHttpError(res, "Unable to delete alerting rule") } diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 050cdbd08..40b49ebef 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -290,7 +290,7 @@ func ConnectorConfigWithDefaults(connectorTypeID, plan, backend, state string) ( return plan, nil } -// User can omit optonal fields in config JSON. +// User can omit optional fields in config JSON. // The func adds empty optional fields to the diff. // Otherwise plan command shows omitted fields as the diff, // because backend returns all fields. diff --git a/internal/clients/kibana/slo.go b/internal/clients/kibana/slo.go index 1c0c519c6..da1b86220 100644 --- a/internal/clients/kibana/slo.go +++ b/internal/clients/kibana/slo.go @@ -50,7 +50,7 @@ func DeleteSlo(ctx context.Context, apiClient *clients.ApiClient, sloId string, } defer res.Body.Close() - return utils.CheckHttpError(res, "Unabled to delete slo with ID "+string(sloId)) + return utils.CheckHttpError(res, "Unable to delete slo with ID "+string(sloId)) } func UpdateSlo(ctx context.Context, apiClient *clients.ApiClient, s models.Slo) (*models.Slo, diag.Diagnostics) { diff --git a/internal/elasticsearch/cluster/cluster_info_data_source.go b/internal/elasticsearch/cluster/cluster_info_data_source.go index 08e2f7c04..c3ea51bb5 100644 --- a/internal/elasticsearch/cluster/cluster_info_data_source.go +++ b/internal/elasticsearch/cluster/cluster_info_data_source.go @@ -48,13 +48,13 @@ func DataSourceClusterInfo() *schema.Resource { Required: false, }, "minimum_index_compatibility_version": { - Description: "Minium index compatibility version.", + Description: "Minimum index compatibility version.", Type: schema.TypeString, Computed: true, Required: false, }, "minimum_wire_compatibility_version": { - Description: "Minium wire compatibility version.", + Description: "Minimum wire compatibility version.", Type: schema.TypeString, Computed: true, Required: false, diff --git a/internal/elasticsearch/security/api_key_test.go b/internal/elasticsearch/security/api_key_test.go index 20838770b..385994bc3 100644 --- a/internal/elasticsearch/security/api_key_test.go +++ b/internal/elasticsearch/security/api_key_test.go @@ -300,7 +300,7 @@ func checkResourceSecurityApiKeyDestroy(s *terraform.State) error { apiKey, diags := elasticsearch.GetApiKey(client, compId.ResourceId) if diags.HasError() { - return fmt.Errorf("Unabled to get API key %v", diags) + return fmt.Errorf("Unable to get API key %v", diags) } if !apiKey.Invalidated { diff --git a/internal/kibana/import_saved_objects/create.go b/internal/kibana/import_saved_objects/create.go index d429e324d..2d559d599 100644 --- a/internal/kibana/import_saved_objects/create.go +++ b/internal/kibana/import_saved_objects/create.go @@ -73,7 +73,7 @@ func (r *Resource) importObjects(ctx context.Context, plan tfsdk.Plan, state *tf for i, err := range respModel.Errors { detail.WriteString(fmt.Sprintf("import error [%d]: %s\n", i, err)) } - detail.WriteString("see the `errors` attribute for the full resposne") + detail.WriteString("see the `errors` attribute for the full response") if respModel.SuccessCount > 0 { diags.AddWarning( diff --git a/libs/go-kibana-rest/README.md b/libs/go-kibana-rest/README.md index c0c276bef..11a502429 100644 --- a/libs/go-kibana-rest/README.md +++ b/libs/go-kibana-rest/README.md @@ -155,7 +155,7 @@ log.Println("Copying config object from 'default' to 'test' user space successfu // Delete user space err = client.API.KibanaSpaces.Delete("test") if err != nil { - log.Fatalf("Error deleteing user space: %s", err) + log.Fatalf("Error deleting user space: %s", err) } log.Println("User space 'test' successfully deleted") ``` diff --git a/libs/go-kibana-rest/_examples/sample.go b/libs/go-kibana-rest/_examples/sample.go index 053a8513a..9eccbfa62 100644 --- a/libs/go-kibana-rest/_examples/sample.go +++ b/libs/go-kibana-rest/_examples/sample.go @@ -132,7 +132,7 @@ func main() { // Delete user space err = client.API.KibanaSpaces.Delete("test") if err != nil { - log.Fatalf("Error deleteing user space: %s", err) + log.Fatalf("Error deleting user space: %s", err) } log.Println("User space 'test' successfully deleted") diff --git a/libs/go-kibana-rest/kbapi/api.kibana_logstash_pipeline.go b/libs/go-kibana-rest/kbapi/api.kibana_logstash_pipeline.go index 698e399b0..ec3ac48c3 100644 --- a/libs/go-kibana-rest/kbapi/api.kibana_logstash_pipeline.go +++ b/libs/go-kibana-rest/kbapi/api.kibana_logstash_pipeline.go @@ -59,7 +59,7 @@ func newKibanaLogstashPipelineGetFunc(c *resty.Client) KibanaLogstashPipelineGet return func(id string) (*LogstashPipeline, error) { if id == "" { - return nil, NewAPIError(600, "You must provide logstash pipline ID") + return nil, NewAPIError(600, "You must provide logstash pipeline ID") } log.Debug("ID: ", id) @@ -143,7 +143,7 @@ func newKibanaLogstashPipelineCreateOrUpdateFunc(c *resty.Client) KibanaLogstash return nil, NewAPIError(resp.StatusCode(), resp.Status()) } - // Retrive the object to return it + // Retrieve the object to return it logstashPipeline, err = newKibanaLogstashPipelineGetFunc(c)(logstashPipeline.ID) if err != nil { return nil, err diff --git a/libs/go-kibana-rest/kbapi/api.kibana_role_management.go b/libs/go-kibana-rest/kbapi/api.kibana_role_management.go index 2ab419515..08dd2b62b 100644 --- a/libs/go-kibana-rest/kbapi/api.kibana_role_management.go +++ b/libs/go-kibana-rest/kbapi/api.kibana_role_management.go @@ -162,7 +162,7 @@ func newKibanaRoleManagementCreateOrUpdateFunc(c *resty.Client) KibanaRoleManage return nil, NewAPIError(resp.StatusCode(), resp.Status()) } - // Retrive the object to return it + // Retrieve the object to return it kibanaRole, err = newKibanaRoleManagementGetFunc(c)(roleName) if err != nil { return nil, err diff --git a/libs/go-kibana-rest/kbapi/api.kibana_save_object.go b/libs/go-kibana-rest/kbapi/api.kibana_save_object.go index a04f18145..92bc7cabc 100644 --- a/libs/go-kibana-rest/kbapi/api.kibana_save_object.go +++ b/libs/go-kibana-rest/kbapi/api.kibana_save_object.go @@ -54,7 +54,7 @@ func (o *OptionalFindParameters) String() string { return string(json) } -// newKibanaSavedObjectGetFunc permit to get saved obejct by it id and type +// newKibanaSavedObjectGetFunc permit to get saved object by it id and type func newKibanaSavedObjectGetFunc(c *resty.Client) KibanaSavedObjectGet { return func(objectType string, id string, kibanaSpace string) (map[string]interface{}, error) { diff --git a/libs/go-kibana-rest/kbapi/api.kibana_spaces.go b/libs/go-kibana-rest/kbapi/api.kibana_spaces.go index 02d9d6374..6ebbf3850 100644 --- a/libs/go-kibana-rest/kbapi/api.kibana_spaces.go +++ b/libs/go-kibana-rest/kbapi/api.kibana_spaces.go @@ -58,7 +58,7 @@ type KibanaSpaceDelete func(id string) error // KibanaSpaceUpdate permit to update space type KibanaSpaceUpdate func(kibanaSpace *KibanaSpace) (*KibanaSpace, error) -// KibanaSpaceCopySavedObjects permit to copy dashboad between space +// KibanaSpaceCopySavedObjects permit to copy dashboard between space type KibanaSpaceCopySavedObjects func(parameter *KibanaSpaceCopySavedObjectParameter, spaceOrigin string) error // String permit to return KibanaSpace object as JSON string @@ -212,7 +212,7 @@ func newKibanaSpaceCopySavedObjectsFunc(c *resty.Client) KibanaSpaceCopySavedObj } -// newKibanaSpaceDeleteFunc permit to delete the kubana space wiht it id +// newKibanaSpaceDeleteFunc permit to delete the kubana space with it id func newKibanaSpaceDeleteFunc(c *resty.Client) KibanaSpaceDelete { return func(id string) error { diff --git a/libs/go-kibana-rest/kbapi/api.kibana_status.go b/libs/go-kibana-rest/kbapi/api.kibana_status.go index c6ad95539..390d10304 100644 --- a/libs/go-kibana-rest/kbapi/api.kibana_status.go +++ b/libs/go-kibana-rest/kbapi/api.kibana_status.go @@ -17,7 +17,7 @@ type KibanaStatus map[string]interface{} // KibanaStatusGet permit to get the current status of Kibana type KibanaStatusGet func() (KibanaStatus, error) -// newKibanaStatusGetFunc permit to get the kibana status and some usefull information +// newKibanaStatusGetFunc permit to get the kibana status and some useful information func newKibanaStatusGetFunc(c *resty.Client) KibanaStatusGet { return func() (KibanaStatus, error) { resp, err := c.R().Get(basePathKibanaStatus) diff --git a/templates/guides/elasticstack-and-cloud.md.tmpl b/templates/guides/elasticstack-and-cloud.md.tmpl index 74089c1bf..36252c538 100644 --- a/templates/guides/elasticstack-and-cloud.md.tmpl +++ b/templates/guides/elasticstack-and-cloud.md.tmpl @@ -33,4 +33,4 @@ Now we can add resources to these deployments as follows: {{ tffile "examples/cloud/stack_resources.tf" }} -Note that resources can be targed to certain deployments using the `provider` attribute. +Note that resources can be targeted to certain deployments using the `provider` attribute. diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl index 6bcff8abd..1432fa90e 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -57,13 +57,13 @@ For Elasticsearch resources, you can use the following variables: - `ELASTICSEARCH_BEARER_TOKEN` - A bearer token to use for Elasticsearch authorization header. - `ELASTICSEARCH_ES_CLIENT_AUTHENTICATION` - The shared secret for the Elasticsearch authorization header. -Kibana resources will re-use any Elasticsearch credentials specified, these may be overridden with the following variables: +Kibana resources will reuse any Elasticsearch credentials specified, these may be overridden with the following variables: - `KIBANA_USERNAME` - The username to use for Kibana authentication - `KIBANA_PASSWORD` - The password to use for Kibana authentication - `KIBANA_ENDPOINT` - The Kibana host to connect to - `KIBANA_API_KEY` - An Elasticsearch API key to use instead of `KIBANA_USERNAME` and `KIBANA_PASSWORD` -Fleet resources will re-use any Kibana or Elasticsearch credentials specified, these may be overridden with the following variables: +Fleet resources will reuse any Kibana or Elasticsearch credentials specified, these may be overridden with the following variables: - `FLEET_USERNAME` - The username to use for Kibana authentication - `FLEET_PASSWORD` - The password to use for Kibana authentication - `FLEET_ENDPOINT` - The Kibana host to connect to. ** Note the Fleet API is hosted within Kibana. This must be a Kibana HTTP host **