We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.elasticcloud.getElasticsearch
Explore with Pulumi AI
Use this data source to access information about an existing Elasticsearch resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.elasticcloud.getElasticsearch({
    name: "my-elastic-search",
    resourceGroupName: "example-resources",
});
export const elasticsearchEndpoint = example.then(example => example.elasticsearchServiceUrl);
export const kibanaEndpoint = example.then(example => example.kibanaServiceUrl);
import pulumi
import pulumi_azure as azure
example = azure.elasticcloud.get_elasticsearch(name="my-elastic-search",
    resource_group_name="example-resources")
pulumi.export("elasticsearchEndpoint", example.elasticsearch_service_url)
pulumi.export("kibanaEndpoint", example.kibana_service_url)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := elasticcloud.LookupElasticsearch(ctx, &elasticcloud.LookupElasticsearchArgs{
			Name:              "my-elastic-search",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("elasticsearchEndpoint", example.ElasticsearchServiceUrl)
		ctx.Export("kibanaEndpoint", example.KibanaServiceUrl)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.ElasticCloud.GetElasticsearch.Invoke(new()
    {
        Name = "my-elastic-search",
        ResourceGroupName = "example-resources",
    });
    return new Dictionary<string, object?>
    {
        ["elasticsearchEndpoint"] = example.Apply(getElasticsearchResult => getElasticsearchResult.ElasticsearchServiceUrl),
        ["kibanaEndpoint"] = example.Apply(getElasticsearchResult => getElasticsearchResult.KibanaServiceUrl),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.elasticcloud.ElasticcloudFunctions;
import com.pulumi.azure.elasticcloud.inputs.GetElasticsearchArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = ElasticcloudFunctions.getElasticsearch(GetElasticsearchArgs.builder()
            .name("my-elastic-search")
            .resourceGroupName("example-resources")
            .build());
        ctx.export("elasticsearchEndpoint", example.applyValue(getElasticsearchResult -> getElasticsearchResult.elasticsearchServiceUrl()));
        ctx.export("kibanaEndpoint", example.applyValue(getElasticsearchResult -> getElasticsearchResult.kibanaServiceUrl()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:elasticcloud:getElasticsearch
      arguments:
        name: my-elastic-search
        resourceGroupName: example-resources
outputs:
  elasticsearchEndpoint: ${example.elasticsearchServiceUrl}
  kibanaEndpoint: ${example.kibanaServiceUrl}
Using getElasticsearch
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getElasticsearch(args: GetElasticsearchArgs, opts?: InvokeOptions): Promise<GetElasticsearchResult>
function getElasticsearchOutput(args: GetElasticsearchOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchResult>def get_elasticsearch(logs: Optional[Sequence[GetElasticsearchLog]] = None,
                      name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetElasticsearchResult
def get_elasticsearch_output(logs: Optional[pulumi.Input[Sequence[pulumi.Input[GetElasticsearchLogArgs]]]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchResult]func LookupElasticsearch(ctx *Context, args *LookupElasticsearchArgs, opts ...InvokeOption) (*LookupElasticsearchResult, error)
func LookupElasticsearchOutput(ctx *Context, args *LookupElasticsearchOutputArgs, opts ...InvokeOption) LookupElasticsearchResultOutput> Note: This function is named LookupElasticsearch in the Go SDK.
public static class GetElasticsearch 
{
    public static Task<GetElasticsearchResult> InvokeAsync(GetElasticsearchArgs args, InvokeOptions? opts = null)
    public static Output<GetElasticsearchResult> Invoke(GetElasticsearchInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetElasticsearchResult> getElasticsearch(GetElasticsearchArgs args, InvokeOptions options)
public static Output<GetElasticsearchResult> getElasticsearch(GetElasticsearchArgs args, InvokeOptions options)
fn::invoke:
  function: azure:elasticcloud/getElasticsearch:getElasticsearch
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Elasticsearch resource.
- ResourceGroup stringName 
- The name of the resource group in which the Elasticsearch exists.
- Logs
List<GetElasticsearch Log> 
- A logsblock as defined below.
- Name string
- The name of the Elasticsearch resource.
- ResourceGroup stringName 
- The name of the resource group in which the Elasticsearch exists.
- Logs
[]GetElasticsearch Log 
- A logsblock as defined below.
- name String
- The name of the Elasticsearch resource.
- resourceGroup StringName 
- The name of the resource group in which the Elasticsearch exists.
- logs
List<GetElasticsearch Log> 
- A logsblock as defined below.
- name string
- The name of the Elasticsearch resource.
- resourceGroup stringName 
- The name of the resource group in which the Elasticsearch exists.
- logs
GetElasticsearch Log[] 
- A logsblock as defined below.
- name str
- The name of the Elasticsearch resource.
- resource_group_ strname 
- The name of the resource group in which the Elasticsearch exists.
- logs
Sequence[GetElasticsearch Log] 
- A logsblock as defined below.
- name String
- The name of the Elasticsearch resource.
- resourceGroup StringName 
- The name of the resource group in which the Elasticsearch exists.
- logs List<Property Map>
- A logsblock as defined below.
getElasticsearch Result
The following output properties are available:
- ElasticCloud stringDeployment Id 
- The ID of the Deployment within Elastic Cloud.
- ElasticCloud stringEmail Address 
- The Email Address which is associated with this Elasticsearch account.
- ElasticCloud stringSso Default Url 
- The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- ElasticCloud stringUser Id 
- The ID of the User Account within Elastic Cloud.
- ElasticsearchService stringUrl 
- The URL to the Elasticsearch Service associated with this Elasticsearch.
- Id string
- The provider-assigned unique ID for this managed resource.
- KibanaService stringUrl 
- The URL to the Kibana Dashboard associated with this Elasticsearch.
- KibanaSso stringUri 
- The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.
- Location string
- The Azure Region in which this Elasticsearch exists.
- Logs
List<GetElasticsearch Log> 
- A logsblock as defined below.
- MonitoringEnabled bool
- Specifies if monitoring is enabled on this Elasticsearch or not.
- Name string
- The name (key) of the Tag which should be filtered.
- ResourceGroup stringName 
- SkuName string
- The name of the SKU used for this Elasticsearch.
- Dictionary<string, string>
- A mapping of tags assigned to the Elasticsearch.
- ElasticCloud stringDeployment Id 
- The ID of the Deployment within Elastic Cloud.
- ElasticCloud stringEmail Address 
- The Email Address which is associated with this Elasticsearch account.
- ElasticCloud stringSso Default Url 
- The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- ElasticCloud stringUser Id 
- The ID of the User Account within Elastic Cloud.
- ElasticsearchService stringUrl 
- The URL to the Elasticsearch Service associated with this Elasticsearch.
- Id string
- The provider-assigned unique ID for this managed resource.
- KibanaService stringUrl 
- The URL to the Kibana Dashboard associated with this Elasticsearch.
- KibanaSso stringUri 
- The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.
- Location string
- The Azure Region in which this Elasticsearch exists.
- Logs
[]GetElasticsearch Log 
- A logsblock as defined below.
- MonitoringEnabled bool
- Specifies if monitoring is enabled on this Elasticsearch or not.
- Name string
- The name (key) of the Tag which should be filtered.
- ResourceGroup stringName 
- SkuName string
- The name of the SKU used for this Elasticsearch.
- map[string]string
- A mapping of tags assigned to the Elasticsearch.
- elasticCloud StringDeployment Id 
- The ID of the Deployment within Elastic Cloud.
- elasticCloud StringEmail Address 
- The Email Address which is associated with this Elasticsearch account.
- elasticCloud StringSso Default Url 
- The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elasticCloud StringUser Id 
- The ID of the User Account within Elastic Cloud.
- elasticsearchService StringUrl 
- The URL to the Elasticsearch Service associated with this Elasticsearch.
- id String
- The provider-assigned unique ID for this managed resource.
- kibanaService StringUrl 
- The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibanaSso StringUri 
- The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.
- location String
- The Azure Region in which this Elasticsearch exists.
- logs
List<GetElasticsearch Log> 
- A logsblock as defined below.
- monitoringEnabled Boolean
- Specifies if monitoring is enabled on this Elasticsearch or not.
- name String
- The name (key) of the Tag which should be filtered.
- resourceGroup StringName 
- skuName String
- The name of the SKU used for this Elasticsearch.
- Map<String,String>
- A mapping of tags assigned to the Elasticsearch.
- elasticCloud stringDeployment Id 
- The ID of the Deployment within Elastic Cloud.
- elasticCloud stringEmail Address 
- The Email Address which is associated with this Elasticsearch account.
- elasticCloud stringSso Default Url 
- The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elasticCloud stringUser Id 
- The ID of the User Account within Elastic Cloud.
- elasticsearchService stringUrl 
- The URL to the Elasticsearch Service associated with this Elasticsearch.
- id string
- The provider-assigned unique ID for this managed resource.
- kibanaService stringUrl 
- The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibanaSso stringUri 
- The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.
- location string
- The Azure Region in which this Elasticsearch exists.
- logs
GetElasticsearch Log[] 
- A logsblock as defined below.
- monitoringEnabled boolean
- Specifies if monitoring is enabled on this Elasticsearch or not.
- name string
- The name (key) of the Tag which should be filtered.
- resourceGroup stringName 
- skuName string
- The name of the SKU used for this Elasticsearch.
- {[key: string]: string}
- A mapping of tags assigned to the Elasticsearch.
- elastic_cloud_ strdeployment_ id 
- The ID of the Deployment within Elastic Cloud.
- elastic_cloud_ stremail_ address 
- The Email Address which is associated with this Elasticsearch account.
- elastic_cloud_ strsso_ default_ url 
- The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elastic_cloud_ struser_ id 
- The ID of the User Account within Elastic Cloud.
- elasticsearch_service_ strurl 
- The URL to the Elasticsearch Service associated with this Elasticsearch.
- id str
- The provider-assigned unique ID for this managed resource.
- kibana_service_ strurl 
- The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibana_sso_ struri 
- The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.
- location str
- The Azure Region in which this Elasticsearch exists.
- logs
Sequence[GetElasticsearch Log] 
- A logsblock as defined below.
- monitoring_enabled bool
- Specifies if monitoring is enabled on this Elasticsearch or not.
- name str
- The name (key) of the Tag which should be filtered.
- resource_group_ strname 
- sku_name str
- The name of the SKU used for this Elasticsearch.
- Mapping[str, str]
- A mapping of tags assigned to the Elasticsearch.
- elasticCloud StringDeployment Id 
- The ID of the Deployment within Elastic Cloud.
- elasticCloud StringEmail Address 
- The Email Address which is associated with this Elasticsearch account.
- elasticCloud StringSso Default Url 
- The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elasticCloud StringUser Id 
- The ID of the User Account within Elastic Cloud.
- elasticsearchService StringUrl 
- The URL to the Elasticsearch Service associated with this Elasticsearch.
- id String
- The provider-assigned unique ID for this managed resource.
- kibanaService StringUrl 
- The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibanaSso StringUri 
- The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.
- location String
- The Azure Region in which this Elasticsearch exists.
- logs List<Property Map>
- A logsblock as defined below.
- monitoringEnabled Boolean
- Specifies if monitoring is enabled on this Elasticsearch or not.
- name String
- The name (key) of the Tag which should be filtered.
- resourceGroup StringName 
- skuName String
- The name of the SKU used for this Elasticsearch.
- Map<String>
- A mapping of tags assigned to the Elasticsearch.
Supporting Types
GetElasticsearchLog  
- 
List<GetElasticsearch Log Filtering Tag> 
- A list of filtering_tagblocks as defined above.
- SendActivity boolLogs 
- Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- SendAzuread boolLogs 
- Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- SendSubscription boolLogs 
- Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- 
[]GetElasticsearch Log Filtering Tag 
- A list of filtering_tagblocks as defined above.
- SendActivity boolLogs 
- Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- SendAzuread boolLogs 
- Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- SendSubscription boolLogs 
- Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- 
List<GetElasticsearch Log Filtering Tag> 
- A list of filtering_tagblocks as defined above.
- sendActivity BooleanLogs 
- Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- sendAzuread BooleanLogs 
- Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- sendSubscription BooleanLogs 
- Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- 
GetElasticsearch Log Filtering Tag[] 
- A list of filtering_tagblocks as defined above.
- sendActivity booleanLogs 
- Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- sendAzuread booleanLogs 
- Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- sendSubscription booleanLogs 
- Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- 
Sequence[GetElasticsearch Log Filtering Tag] 
- A list of filtering_tagblocks as defined above.
- send_activity_ boollogs 
- Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- send_azuread_ boollogs 
- Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- send_subscription_ boollogs 
- Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- List<Property Map>
- A list of filtering_tagblocks as defined above.
- sendActivity BooleanLogs 
- Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- sendAzuread BooleanLogs 
- Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- sendSubscription BooleanLogs 
- Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
GetElasticsearchLogFilteringTag    
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.