Skip to content

azurermElasticCloudElasticsearch

Manages an Elasticsearch in Elastic Cloud.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupTest = new azurerm.resourceGroup.ResourceGroup(
  this,
  "test",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermElasticCloudElasticsearchTest =
  new azurerm.elasticCloudElasticsearch.ElasticCloudElasticsearch(
    this,
    "test_1",
    {
      elastic_cloud_email_address: "user@example.com",
      location: azurermResourceGroupTest.location,
      name: "example-elasticsearch",
      resource_group_name: azurermResourceGroupTest.name,
      sku_name: "ess-monthly-consumption_Monthly",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermElasticCloudElasticsearchTest.overrideLogicalId("test");

Arguments Reference

The following arguments are supported:

  • elasticCloudEmailAddress - (Required) Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created.

  • location - (Required) The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.

  • name - (Required) The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created.

  • skuName - (Required) Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created.


  • logs - (Optional) A logs block as defined below.

  • monitoringEnabled - (Optional) Specifies if the Elasticsearch should have monitoring configured? Defaults to true. Changing this forces a new Elasticsearch to be created.

  • tags - (Optional) A mapping of tags which should be assigned to the Elasticsearch resource.


The filteringTag block supports the following:

  • action - (Required) Specifies the type of action which should be taken when the Tag matches the name and value. Possible values are exclude and include.

  • name - (Required) Specifies the name (key) of the Tag which should be filtered.

  • value - (Required) Specifies the value of the Tag which should be filtered.


The logs block supports the following:

  • filteringTag - (Optional) A list of filteringTag blocks as defined above.

  • sendActivityLogs - (Optional) Specifies if the Azure Activity Logs should be sent to the Elasticsearch cluster. Defaults to false.

  • sendAzureadLogs - (Optional) Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to false.

  • sendSubscriptionLogs - (Optional) Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to false.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Elasticsearch.

  • elasticCloudDeploymentId - The ID of the Deployment within Elastic Cloud.

  • elasticCloudSsoDefaultUrl - The Default URL used for Single Sign On (SSO) to Elastic Cloud.

  • elasticCloudUserId - The ID of the User Account within Elastic Cloud.

  • elasticsearchServiceUrl - The URL to the Elasticsearch Service associated with this Elasticsearch.

  • kibanaServiceUrl - The URL to the Kibana Dashboard associated with this Elasticsearch.

  • kibanaSsoUri - The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 60 minutes) Used when creating the Elasticsearch.
  • read - (Defaults to 5 minutes) Used when retrieving the Elasticsearch.
  • update - (Defaults to 60 minutes) Used when updating the Elasticsearch.
  • delete - (Defaults to 60 minutes) Used when deleting the Elasticsearch.

Import

Elasticsearch's can be imported using the resourceId, e.g.

terraform import azurerm_elastic_cloud_elasticsearch.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Elastic/monitors/monitor1