Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/elasticstack-and-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 **
Expand Down
2 changes: 1 addition & 1 deletion generated/connectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down
4 changes: 2 additions & 2 deletions generated/connectors/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions generated/fleet/fleet.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generated/slo-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion generated/slo/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion generated/slo/docs/ErrorBudget.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

Expand Down
2 changes: 1 addition & 1 deletion generated/slo/model_error_budget.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/clients/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/clients/config/fleet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion internal/clients/config/kibana.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/clients/kibana/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
2 changes: 1 addition & 1 deletion internal/clients/kibana/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/clients/kibana/slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions internal/elasticsearch/cluster/cluster_info_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/elasticsearch/security/api_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/kibana/import_saved_objects/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion libs/go-kibana-rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```
Expand Down
2 changes: 1 addition & 1 deletion libs/go-kibana-rest/_examples/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
4 changes: 2 additions & 2 deletions libs/go-kibana-rest/kbapi/api.kibana_logstash_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/go-kibana-rest/kbapi/api.kibana_role_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/go-kibana-rest/kbapi/api.kibana_save_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
4 changes: 2 additions & 2 deletions libs/go-kibana-rest/kbapi/api.kibana_spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion libs/go-kibana-rest/kbapi/api.kibana_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion templates/guides/elasticstack-and-cloud.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 **
Expand Down