We recommend using Azure Native.
azure.elasticcloud.getElasticsearch
Explore with Pulumi AI
Use this data source to access information about an existing Elasticsearch resource.
Example Usage
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 main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/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
})
}
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()));
}
}
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)
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);
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:elasticcloud/getElasticsearch:getElasticsearch
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
The name of the Elasticsearch resource.
- Resource
Group stringName The name of the resource group in which the Elasticsearch exists.
- Logs
List<Get
Elasticsearch Log> A
logs
block as defined below.
- Name string
The name of the Elasticsearch resource.
- Resource
Group stringName The name of the resource group in which the Elasticsearch exists.
- Logs
[]Get
Elasticsearch Log A
logs
block as defined below.
- name String
The name of the Elasticsearch resource.
- resource
Group StringName The name of the resource group in which the Elasticsearch exists.
- logs
List<Get
Elasticsearch Log> A
logs
block as defined below.
- name string
The name of the Elasticsearch resource.
- resource
Group stringName The name of the resource group in which the Elasticsearch exists.
- logs
Get
Elasticsearch Log[] A
logs
block 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[Get
Elasticsearch Log] A
logs
block as defined below.
- name String
The name of the Elasticsearch resource.
- resource
Group StringName The name of the resource group in which the Elasticsearch exists.
- logs List<Property Map>
A
logs
block as defined below.
getElasticsearch Result
The following output properties are available:
- Elastic
Cloud stringDeployment Id The ID of the Deployment within Elastic Cloud.
- Elastic
Cloud stringEmail Address The Email Address which is associated with this Elasticsearch account.
- Elastic
Cloud stringSso Default Url The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- Elastic
Cloud stringUser Id The ID of the User Account within Elastic Cloud.
- Elasticsearch
Service stringUrl The URL to the Elasticsearch Service associated with this Elasticsearch.
- Id string
The provider-assigned unique ID for this managed resource.
- Kibana
Service stringUrl The URL to the Kibana Dashboard associated with this Elasticsearch.
- Kibana
Sso 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<Get
Elasticsearch Log> A
logs
block as defined below.- Monitoring
Enabled bool Specifies if monitoring is enabled on this Elasticsearch or not.
- Name string
The name (key) of the Tag which should be filtered.
- Resource
Group stringName - Sku
Name string The name of the SKU used for this Elasticsearch.
- Dictionary<string, string>
A mapping of tags assigned to the Elasticsearch.
- Elastic
Cloud stringDeployment Id The ID of the Deployment within Elastic Cloud.
- Elastic
Cloud stringEmail Address The Email Address which is associated with this Elasticsearch account.
- Elastic
Cloud stringSso Default Url The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- Elastic
Cloud stringUser Id The ID of the User Account within Elastic Cloud.
- Elasticsearch
Service stringUrl The URL to the Elasticsearch Service associated with this Elasticsearch.
- Id string
The provider-assigned unique ID for this managed resource.
- Kibana
Service stringUrl The URL to the Kibana Dashboard associated with this Elasticsearch.
- Kibana
Sso 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
[]Get
Elasticsearch Log A
logs
block as defined below.- Monitoring
Enabled bool Specifies if monitoring is enabled on this Elasticsearch or not.
- Name string
The name (key) of the Tag which should be filtered.
- Resource
Group stringName - Sku
Name string The name of the SKU used for this Elasticsearch.
- map[string]string
A mapping of tags assigned to the Elasticsearch.
- elastic
Cloud StringDeployment Id The ID of the Deployment within Elastic Cloud.
- elastic
Cloud StringEmail Address The Email Address which is associated with this Elasticsearch account.
- elastic
Cloud StringSso Default Url The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elastic
Cloud StringUser Id The ID of the User Account within Elastic Cloud.
- elasticsearch
Service StringUrl The URL to the Elasticsearch Service associated with this Elasticsearch.
- id String
The provider-assigned unique ID for this managed resource.
- kibana
Service StringUrl The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibana
Sso 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<Get
Elasticsearch Log> A
logs
block as defined below.- monitoring
Enabled Boolean Specifies if monitoring is enabled on this Elasticsearch or not.
- name String
The name (key) of the Tag which should be filtered.
- resource
Group StringName - sku
Name String The name of the SKU used for this Elasticsearch.
- Map<String,String>
A mapping of tags assigned to the Elasticsearch.
- elastic
Cloud stringDeployment Id The ID of the Deployment within Elastic Cloud.
- elastic
Cloud stringEmail Address The Email Address which is associated with this Elasticsearch account.
- elastic
Cloud stringSso Default Url The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elastic
Cloud stringUser Id The ID of the User Account within Elastic Cloud.
- elasticsearch
Service stringUrl The URL to the Elasticsearch Service associated with this Elasticsearch.
- id string
The provider-assigned unique ID for this managed resource.
- kibana
Service stringUrl The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibana
Sso 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
Get
Elasticsearch Log[] A
logs
block as defined below.- monitoring
Enabled boolean Specifies if monitoring is enabled on this Elasticsearch or not.
- name string
The name (key) of the Tag which should be filtered.
- resource
Group stringName - sku
Name 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[Get
Elasticsearch Log] A
logs
block 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.
- elastic
Cloud StringDeployment Id The ID of the Deployment within Elastic Cloud.
- elastic
Cloud StringEmail Address The Email Address which is associated with this Elasticsearch account.
- elastic
Cloud StringSso Default Url The Default URL used for Single Sign On (SSO) to Elastic Cloud.
- elastic
Cloud StringUser Id The ID of the User Account within Elastic Cloud.
- elasticsearch
Service StringUrl The URL to the Elasticsearch Service associated with this Elasticsearch.
- id String
The provider-assigned unique ID for this managed resource.
- kibana
Service StringUrl The URL to the Kibana Dashboard associated with this Elasticsearch.
- kibana
Sso 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
logs
block as defined below.- monitoring
Enabled Boolean Specifies if monitoring is enabled on this Elasticsearch or not.
- name String
The name (key) of the Tag which should be filtered.
- resource
Group StringName - sku
Name String The name of the SKU used for this Elasticsearch.
- Map<String>
A mapping of tags assigned to the Elasticsearch.
Supporting Types
GetElasticsearchLog
- List<Get
Elasticsearch Log Filtering Tag> A list of
filtering_tag
blocks 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?
- []Get
Elasticsearch Log Filtering Tag A list of
filtering_tag
blocks 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<Get
Elasticsearch Log Filtering Tag> A list of
filtering_tag
blocks as defined above.- send
Activity BooleanLogs Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- send
Azuread BooleanLogs Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- send
Subscription BooleanLogs Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- Get
Elasticsearch Log Filtering Tag[] A list of
filtering_tag
blocks as defined above.- send
Activity booleanLogs Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- send
Azuread booleanLogs Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- send
Subscription booleanLogs Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?
- Sequence[Get
Elasticsearch Log Filtering Tag] A list of
filtering_tag
blocks 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_tag
blocks as defined above.- send
Activity BooleanLogs Should the Azure Activity Logs should be sent to the Elasticsearch cluster?
- send
Azuread BooleanLogs Should the AzureAD Logs should be sent to the Elasticsearch cluster?
- send
Subscription 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
azurerm
Terraform Provider.