elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic
elasticstack.getElasticsearchSecurityUser
Explore with Pulumi AI
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic
Use this data source to get information about existing Elasticsearch user. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html".
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const userElasticsearchSecurityUser = elasticstack.getElasticsearchSecurityUser({
username: "elastic",
});
export const user = userElasticsearchSecurityUser;
import pulumi
import pulumi_elasticstack as elasticstack
user_elasticsearch_security_user = elasticstack.get_elasticsearch_security_user(username="elastic")
pulumi.export("user", user_elasticsearch_security_user)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
userElasticsearchSecurityUser, err := elasticstack.LookupElasticsearchSecurityUser(ctx, &elasticstack.LookupElasticsearchSecurityUserArgs{
Username: "elastic",
}, nil)
if err != nil {
return err
}
ctx.Export("user", userElasticsearchSecurityUser)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
var userElasticsearchSecurityUser = Elasticstack.GetElasticsearchSecurityUser.Invoke(new()
{
Username = "elastic",
});
return new Dictionary<string, object?>
{
["user"] = userElasticsearchSecurityUser,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.ElasticstackFunctions;
import com.pulumi.elasticstack.inputs.GetElasticsearchSecurityUserArgs;
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 userElasticsearchSecurityUser = ElasticstackFunctions.getElasticsearchSecurityUser(GetElasticsearchSecurityUserArgs.builder()
.username("elastic")
.build());
ctx.export("user", userElasticsearchSecurityUser.applyValue(getElasticsearchSecurityUserResult -> getElasticsearchSecurityUserResult));
}
}
variables:
userElasticsearchSecurityUser:
fn::invoke:
function: elasticstack:getElasticsearchSecurityUser
arguments:
username: elastic
outputs:
user: ${userElasticsearchSecurityUser}
Using getElasticsearchSecurityUser
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 getElasticsearchSecurityUser(args: GetElasticsearchSecurityUserArgs, opts?: InvokeOptions): Promise<GetElasticsearchSecurityUserResult>
function getElasticsearchSecurityUserOutput(args: GetElasticsearchSecurityUserOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchSecurityUserResult>
def get_elasticsearch_security_user(elasticsearch_connection: Optional[GetElasticsearchSecurityUserElasticsearchConnection] = None,
username: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetElasticsearchSecurityUserResult
def get_elasticsearch_security_user_output(elasticsearch_connection: Optional[pulumi.Input[GetElasticsearchSecurityUserElasticsearchConnectionArgs]] = None,
username: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchSecurityUserResult]
func LookupElasticsearchSecurityUser(ctx *Context, args *LookupElasticsearchSecurityUserArgs, opts ...InvokeOption) (*LookupElasticsearchSecurityUserResult, error)
func LookupElasticsearchSecurityUserOutput(ctx *Context, args *LookupElasticsearchSecurityUserOutputArgs, opts ...InvokeOption) LookupElasticsearchSecurityUserResultOutput
> Note: This function is named LookupElasticsearchSecurityUser
in the Go SDK.
public static class GetElasticsearchSecurityUser
{
public static Task<GetElasticsearchSecurityUserResult> InvokeAsync(GetElasticsearchSecurityUserArgs args, InvokeOptions? opts = null)
public static Output<GetElasticsearchSecurityUserResult> Invoke(GetElasticsearchSecurityUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetElasticsearchSecurityUserResult> getElasticsearchSecurityUser(GetElasticsearchSecurityUserArgs args, InvokeOptions options)
public static Output<GetElasticsearchSecurityUserResult> getElasticsearchSecurityUser(GetElasticsearchSecurityUserArgs args, InvokeOptions options)
fn::invoke:
function: elasticstack:index/getElasticsearchSecurityUser:getElasticsearchSecurityUser
arguments:
# arguments dictionary
The following arguments are supported:
- Username string
- An identifier for the user
- Elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Username string
- An identifier for the user
- Elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- username String
- An identifier for the user
- elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- username string
- An identifier for the user
- elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- username str
- An identifier for the user
- elasticsearch_
connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- username String
- An identifier for the user
- elasticsearch
Connection Property Map - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
getElasticsearchSecurityUser Result
The following output properties are available:
- Email string
- The email of the user.
- Enabled bool
- Specifies whether the user is enabled. The default value is true.
- Full
Name string - The full name of the user.
- Id string
- Internal identifier of the resource
- Metadata string
- Arbitrary metadata that you want to associate with the user.
- Roles List<string>
- A set of roles the user has. The roles determine the user’s access permissions. Default is [].
- Username string
- An identifier for the user
- Elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Email string
- The email of the user.
- Enabled bool
- Specifies whether the user is enabled. The default value is true.
- Full
Name string - The full name of the user.
- Id string
- Internal identifier of the resource
- Metadata string
- Arbitrary metadata that you want to associate with the user.
- Roles []string
- A set of roles the user has. The roles determine the user’s access permissions. Default is [].
- Username string
- An identifier for the user
- Elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- email String
- The email of the user.
- enabled Boolean
- Specifies whether the user is enabled. The default value is true.
- full
Name String - The full name of the user.
- id String
- Internal identifier of the resource
- metadata String
- Arbitrary metadata that you want to associate with the user.
- roles List<String>
- A set of roles the user has. The roles determine the user’s access permissions. Default is [].
- username String
- An identifier for the user
- elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- email string
- The email of the user.
- enabled boolean
- Specifies whether the user is enabled. The default value is true.
- full
Name string - The full name of the user.
- id string
- Internal identifier of the resource
- metadata string
- Arbitrary metadata that you want to associate with the user.
- roles string[]
- A set of roles the user has. The roles determine the user’s access permissions. Default is [].
- username string
- An identifier for the user
- elasticsearch
Connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- email str
- The email of the user.
- enabled bool
- Specifies whether the user is enabled. The default value is true.
- full_
name str - The full name of the user.
- id str
- Internal identifier of the resource
- metadata str
- Arbitrary metadata that you want to associate with the user.
- roles Sequence[str]
- A set of roles the user has. The roles determine the user’s access permissions. Default is [].
- username str
- An identifier for the user
- elasticsearch_
connection GetElasticsearch Security User Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- email String
- The email of the user.
- enabled Boolean
- Specifies whether the user is enabled. The default value is true.
- full
Name String - The full name of the user.
- id String
- Internal identifier of the resource
- metadata String
- Arbitrary metadata that you want to associate with the user.
- roles List<String>
- A set of roles the user has. The roles determine the user’s access permissions. Default is [].
- username String
- An identifier for the user
- elasticsearch
Connection Property Map - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
Supporting Types
GetElasticsearchSecurityUserElasticsearchConnection
- Api
Key string - API Key to use for authentication to Elasticsearch
- Bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- Ca
Data string - PEM-encoded custom Certificate Authority certificate
- Ca
File string - Path to a custom Certificate Authority certificate
- Cert
Data string - PEM encoded certificate for client auth
- Cert
File string - Path to a file containing the PEM encoded certificate for client auth
- Endpoints List<string>
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- Insecure bool
- Disable TLS certificate validation
- Key
Data string - PEM encoded private key for client auth
- Key
File string - Path to a file containing the PEM encoded private key for client auth
- Password string
- Password to use for API authentication to Elasticsearch.
- Username string
- Username to use for API authentication to Elasticsearch.
- Api
Key string - API Key to use for authentication to Elasticsearch
- Bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- Ca
Data string - PEM-encoded custom Certificate Authority certificate
- Ca
File string - Path to a custom Certificate Authority certificate
- Cert
Data string - PEM encoded certificate for client auth
- Cert
File string - Path to a file containing the PEM encoded certificate for client auth
- Endpoints []string
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- Insecure bool
- Disable TLS certificate validation
- Key
Data string - PEM encoded private key for client auth
- Key
File string - Path to a file containing the PEM encoded private key for client auth
- Password string
- Password to use for API authentication to Elasticsearch.
- Username string
- Username to use for API authentication to Elasticsearch.
- api
Key String - API Key to use for authentication to Elasticsearch
- bearer
Token String - Bearer Token to use for authentication to Elasticsearch
- ca
Data String - PEM-encoded custom Certificate Authority certificate
- ca
File String - Path to a custom Certificate Authority certificate
- cert
Data String - PEM encoded certificate for client auth
- cert
File String - Path to a file containing the PEM encoded certificate for client auth
- endpoints List<String>
- es
Client StringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure Boolean
- Disable TLS certificate validation
- key
Data String - PEM encoded private key for client auth
- key
File String - Path to a file containing the PEM encoded private key for client auth
- password String
- Password to use for API authentication to Elasticsearch.
- username String
- Username to use for API authentication to Elasticsearch.
- api
Key string - API Key to use for authentication to Elasticsearch
- bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- ca
Data string - PEM-encoded custom Certificate Authority certificate
- ca
File string - Path to a custom Certificate Authority certificate
- cert
Data string - PEM encoded certificate for client auth
- cert
File string - Path to a file containing the PEM encoded certificate for client auth
- endpoints string[]
- es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure boolean
- Disable TLS certificate validation
- key
Data string - PEM encoded private key for client auth
- key
File string - Path to a file containing the PEM encoded private key for client auth
- password string
- Password to use for API authentication to Elasticsearch.
- username string
- Username to use for API authentication to Elasticsearch.
- api_
key str - API Key to use for authentication to Elasticsearch
- bearer_
token str - Bearer Token to use for authentication to Elasticsearch
- ca_
data str - PEM-encoded custom Certificate Authority certificate
- ca_
file str - Path to a custom Certificate Authority certificate
- cert_
data str - PEM encoded certificate for client auth
- cert_
file str - Path to a file containing the PEM encoded certificate for client auth
- endpoints Sequence[str]
- es_
client_ strauthentication - ES Client Authentication field to be used with the JWT token
- insecure bool
- Disable TLS certificate validation
- key_
data str - PEM encoded private key for client auth
- key_
file str - Path to a file containing the PEM encoded private key for client auth
- password str
- Password to use for API authentication to Elasticsearch.
- username str
- Username to use for API authentication to Elasticsearch.
- api
Key String - API Key to use for authentication to Elasticsearch
- bearer
Token String - Bearer Token to use for authentication to Elasticsearch
- ca
Data String - PEM-encoded custom Certificate Authority certificate
- ca
File String - Path to a custom Certificate Authority certificate
- cert
Data String - PEM encoded certificate for client auth
- cert
File String - Path to a file containing the PEM encoded certificate for client auth
- endpoints List<String>
- es
Client StringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure Boolean
- Disable TLS certificate validation
- key
Data String - PEM encoded private key for client auth
- key
File String - Path to a file containing the PEM encoded private key for client auth
- password String
- Password to use for API authentication to Elasticsearch.
- username String
- Username to use for API authentication to Elasticsearch.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstack
Terraform Provider.
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic