1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. ElasticsearchSecurityRoleMapping
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

elasticstack.ElasticsearchSecurityRoleMapping

Explore with Pulumi AI

elasticstack logo
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

    Manage role mappings. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const example = new elasticstack.ElasticsearchSecurityRoleMapping("example", {
        enabled: true,
        roles: ["admin"],
        rules: JSON.stringify({
            any: [
                {
                    field: {
                        username: "esadmin",
                    },
                },
                {
                    field: {
                        groups: "cn=admins,dc=example,dc=com",
                    },
                },
            ],
        }),
    });
    export const role = example.name;
    
    import pulumi
    import json
    import pulumi_elasticstack as elasticstack
    
    example = elasticstack.ElasticsearchSecurityRoleMapping("example",
        enabled=True,
        roles=["admin"],
        rules=json.dumps({
            "any": [
                {
                    "field": {
                        "username": "esadmin",
                    },
                },
                {
                    "field": {
                        "groups": "cn=admins,dc=example,dc=com",
                    },
                },
            ],
        }))
    pulumi.export("role", example.name)
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"any": []interface{}{
    				map[string]interface{}{
    					"field": map[string]interface{}{
    						"username": "esadmin",
    					},
    				},
    				map[string]interface{}{
    					"field": map[string]interface{}{
    						"groups": "cn=admins,dc=example,dc=com",
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		example, err := elasticstack.NewElasticsearchSecurityRoleMapping(ctx, "example", &elasticstack.ElasticsearchSecurityRoleMappingArgs{
    			Enabled: pulumi.Bool(true),
    			Roles: pulumi.StringArray{
    				pulumi.String("admin"),
    			},
    			Rules: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("role", example.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Elasticstack.ElasticsearchSecurityRoleMapping("example", new()
        {
            Enabled = true,
            Roles = new[]
            {
                "admin",
            },
            Rules = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["any"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["field"] = new Dictionary<string, object?>
                        {
                            ["username"] = "esadmin",
                        },
                    },
                    new Dictionary<string, object?>
                    {
                        ["field"] = new Dictionary<string, object?>
                        {
                            ["groups"] = "cn=admins,dc=example,dc=com",
                        },
                    },
                },
            }),
        });
    
        return new Dictionary<string, object?>
        {
            ["role"] = example.Name,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticsearchSecurityRoleMapping;
    import com.pulumi.elasticstack.ElasticsearchSecurityRoleMappingArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            var example = new ElasticsearchSecurityRoleMapping("example", ElasticsearchSecurityRoleMappingArgs.builder()
                .enabled(true)
                .roles("admin")
                .rules(serializeJson(
                    jsonObject(
                        jsonProperty("any", jsonArray(
                            jsonObject(
                                jsonProperty("field", jsonObject(
                                    jsonProperty("username", "esadmin")
                                ))
                            ), 
                            jsonObject(
                                jsonProperty("field", jsonObject(
                                    jsonProperty("groups", "cn=admins,dc=example,dc=com")
                                ))
                            )
                        ))
                    )))
                .build());
    
            ctx.export("role", example.name());
        }
    }
    
    resources:
      example:
        type: elasticstack:ElasticsearchSecurityRoleMapping
        properties:
          enabled: true
          roles:
            - admin
          rules:
            fn::toJSON:
              any:
                - field:
                    username: esadmin
                - field:
                    groups: cn=admins,dc=example,dc=com
    outputs:
      role: ${example.name}
    

    Create ElasticsearchSecurityRoleMapping Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ElasticsearchSecurityRoleMapping(name: string, args: ElasticsearchSecurityRoleMappingArgs, opts?: CustomResourceOptions);
    @overload
    def ElasticsearchSecurityRoleMapping(resource_name: str,
                                         args: ElasticsearchSecurityRoleMappingArgs,
                                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ElasticsearchSecurityRoleMapping(resource_name: str,
                                         opts: Optional[ResourceOptions] = None,
                                         rules: Optional[str] = None,
                                         elasticsearch_connection: Optional[ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs] = None,
                                         enabled: Optional[bool] = None,
                                         metadata: Optional[str] = None,
                                         name: Optional[str] = None,
                                         role_templates: Optional[str] = None,
                                         roles: Optional[Sequence[str]] = None)
    func NewElasticsearchSecurityRoleMapping(ctx *Context, name string, args ElasticsearchSecurityRoleMappingArgs, opts ...ResourceOption) (*ElasticsearchSecurityRoleMapping, error)
    public ElasticsearchSecurityRoleMapping(string name, ElasticsearchSecurityRoleMappingArgs args, CustomResourceOptions? opts = null)
    public ElasticsearchSecurityRoleMapping(String name, ElasticsearchSecurityRoleMappingArgs args)
    public ElasticsearchSecurityRoleMapping(String name, ElasticsearchSecurityRoleMappingArgs args, CustomResourceOptions options)
    
    type: elasticstack:ElasticsearchSecurityRoleMapping
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ElasticsearchSecurityRoleMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ElasticsearchSecurityRoleMappingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ElasticsearchSecurityRoleMappingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ElasticsearchSecurityRoleMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ElasticsearchSecurityRoleMappingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var elasticsearchSecurityRoleMappingResource = new Elasticstack.ElasticsearchSecurityRoleMapping("elasticsearchSecurityRoleMappingResource", new()
    {
        Rules = "string",
        Enabled = false,
        Metadata = "string",
        Name = "string",
        RoleTemplates = "string",
        Roles = new[]
        {
            "string",
        },
    });
    
    example, err := elasticstack.NewElasticsearchSecurityRoleMapping(ctx, "elasticsearchSecurityRoleMappingResource", &elasticstack.ElasticsearchSecurityRoleMappingArgs{
    	Rules:         pulumi.String("string"),
    	Enabled:       pulumi.Bool(false),
    	Metadata:      pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	RoleTemplates: pulumi.String("string"),
    	Roles: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var elasticsearchSecurityRoleMappingResource = new ElasticsearchSecurityRoleMapping("elasticsearchSecurityRoleMappingResource", ElasticsearchSecurityRoleMappingArgs.builder()
        .rules("string")
        .enabled(false)
        .metadata("string")
        .name("string")
        .roleTemplates("string")
        .roles("string")
        .build());
    
    elasticsearch_security_role_mapping_resource = elasticstack.ElasticsearchSecurityRoleMapping("elasticsearchSecurityRoleMappingResource",
        rules="string",
        enabled=False,
        metadata="string",
        name="string",
        role_templates="string",
        roles=["string"])
    
    const elasticsearchSecurityRoleMappingResource = new elasticstack.ElasticsearchSecurityRoleMapping("elasticsearchSecurityRoleMappingResource", {
        rules: "string",
        enabled: false,
        metadata: "string",
        name: "string",
        roleTemplates: "string",
        roles: ["string"],
    });
    
    type: elasticstack:ElasticsearchSecurityRoleMapping
    properties:
        enabled: false
        metadata: string
        name: string
        roleTemplates: string
        roles:
            - string
        rules: string
    

    ElasticsearchSecurityRoleMapping Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ElasticsearchSecurityRoleMapping resource accepts the following input properties:

    Rules string
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    ElasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Enabled bool
    Mappings that have enabled set to false are ignored when role mapping is performed.
    Metadata string
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    Name string
    The distinct name that identifies the role mapping, used solely as an identifier.
    RoleTemplates string
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    Roles List<string>
    A list of role names that are granted to the users that match the role mapping rules.
    Rules string
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    ElasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Enabled bool
    Mappings that have enabled set to false are ignored when role mapping is performed.
    Metadata string
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    Name string
    The distinct name that identifies the role mapping, used solely as an identifier.
    RoleTemplates string
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    Roles []string
    A list of role names that are granted to the users that match the role mapping rules.
    rules String
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    enabled Boolean
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata String
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name String
    The distinct name that identifies the role mapping, used solely as an identifier.
    roleTemplates String
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles List<String>
    A list of role names that are granted to the users that match the role mapping rules.
    rules string
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    enabled boolean
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata string
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name string
    The distinct name that identifies the role mapping, used solely as an identifier.
    roleTemplates string
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles string[]
    A list of role names that are granted to the users that match the role mapping rules.
    rules str
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearch_connection ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    enabled bool
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata str
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name str
    The distinct name that identifies the role mapping, used solely as an identifier.
    role_templates str
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles Sequence[str]
    A list of role names that are granted to the users that match the role mapping rules.
    rules String
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearchConnection 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.

    Deprecated: Deprecated

    enabled Boolean
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata String
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name String
    The distinct name that identifies the role mapping, used solely as an identifier.
    roleTemplates String
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles List<String>
    A list of role names that are granted to the users that match the role mapping rules.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ElasticsearchSecurityRoleMapping resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ElasticsearchSecurityRoleMapping Resource

    Get an existing ElasticsearchSecurityRoleMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ElasticsearchSecurityRoleMappingState, opts?: CustomResourceOptions): ElasticsearchSecurityRoleMapping
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            elasticsearch_connection: Optional[ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs] = None,
            enabled: Optional[bool] = None,
            metadata: Optional[str] = None,
            name: Optional[str] = None,
            role_templates: Optional[str] = None,
            roles: Optional[Sequence[str]] = None,
            rules: Optional[str] = None) -> ElasticsearchSecurityRoleMapping
    func GetElasticsearchSecurityRoleMapping(ctx *Context, name string, id IDInput, state *ElasticsearchSecurityRoleMappingState, opts ...ResourceOption) (*ElasticsearchSecurityRoleMapping, error)
    public static ElasticsearchSecurityRoleMapping Get(string name, Input<string> id, ElasticsearchSecurityRoleMappingState? state, CustomResourceOptions? opts = null)
    public static ElasticsearchSecurityRoleMapping get(String name, Output<String> id, ElasticsearchSecurityRoleMappingState state, CustomResourceOptions options)
    resources:  _:    type: elasticstack:ElasticsearchSecurityRoleMapping    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ElasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Enabled bool
    Mappings that have enabled set to false are ignored when role mapping is performed.
    Metadata string
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    Name string
    The distinct name that identifies the role mapping, used solely as an identifier.
    RoleTemplates string
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    Roles List<string>
    A list of role names that are granted to the users that match the role mapping rules.
    Rules string
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    ElasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Enabled bool
    Mappings that have enabled set to false are ignored when role mapping is performed.
    Metadata string
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    Name string
    The distinct name that identifies the role mapping, used solely as an identifier.
    RoleTemplates string
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    Roles []string
    A list of role names that are granted to the users that match the role mapping rules.
    Rules string
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    enabled Boolean
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata String
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name String
    The distinct name that identifies the role mapping, used solely as an identifier.
    roleTemplates String
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles List<String>
    A list of role names that are granted to the users that match the role mapping rules.
    rules String
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearchConnection ElasticsearchSecurityRoleMappingElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    enabled boolean
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata string
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name string
    The distinct name that identifies the role mapping, used solely as an identifier.
    roleTemplates string
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles string[]
    A list of role names that are granted to the users that match the role mapping rules.
    rules string
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearch_connection ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    enabled bool
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata str
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name str
    The distinct name that identifies the role mapping, used solely as an identifier.
    role_templates str
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles Sequence[str]
    A list of role names that are granted to the users that match the role mapping rules.
    rules str
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
    elasticsearchConnection 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.

    Deprecated: Deprecated

    enabled Boolean
    Mappings that have enabled set to false are ignored when role mapping is performed.
    metadata String
    Additional metadata that helps define which roles are assigned to each user. Keys beginning with _ are reserved for system usage.
    name String
    The distinct name that identifies the role mapping, used solely as an identifier.
    roleTemplates String
    A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
    roles List<String>
    A list of role names that are granted to the users that match the role mapping rules.
    rules String
    The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.

    Supporting Types

    ElasticsearchSecurityRoleMappingElasticsearchConnection, ElasticsearchSecurityRoleMappingElasticsearchConnectionArgs

    ApiKey string
    API Key to use for authentication to Elasticsearch
    BearerToken string
    Bearer Token to use for authentication to Elasticsearch
    CaData string
    PEM-encoded custom Certificate Authority certificate
    CaFile string
    Path to a custom Certificate Authority certificate
    CertData string
    PEM encoded certificate for client auth
    CertFile string
    Path to a file containing the PEM encoded certificate for client auth
    Endpoints List<string>
    EsClientAuthentication string
    ES Client Authentication field to be used with the JWT token
    Insecure bool
    Disable TLS certificate validation
    KeyData string
    PEM encoded private key for client auth
    KeyFile 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.
    ApiKey string
    API Key to use for authentication to Elasticsearch
    BearerToken string
    Bearer Token to use for authentication to Elasticsearch
    CaData string
    PEM-encoded custom Certificate Authority certificate
    CaFile string
    Path to a custom Certificate Authority certificate
    CertData string
    PEM encoded certificate for client auth
    CertFile string
    Path to a file containing the PEM encoded certificate for client auth
    Endpoints []string
    EsClientAuthentication string
    ES Client Authentication field to be used with the JWT token
    Insecure bool
    Disable TLS certificate validation
    KeyData string
    PEM encoded private key for client auth
    KeyFile 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.
    apiKey String
    API Key to use for authentication to Elasticsearch
    bearerToken String
    Bearer Token to use for authentication to Elasticsearch
    caData String
    PEM-encoded custom Certificate Authority certificate
    caFile String
    Path to a custom Certificate Authority certificate
    certData String
    PEM encoded certificate for client auth
    certFile String
    Path to a file containing the PEM encoded certificate for client auth
    endpoints List<String>
    esClientAuthentication String
    ES Client Authentication field to be used with the JWT token
    insecure Boolean
    Disable TLS certificate validation
    keyData String
    PEM encoded private key for client auth
    keyFile 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.
    apiKey string
    API Key to use for authentication to Elasticsearch
    bearerToken string
    Bearer Token to use for authentication to Elasticsearch
    caData string
    PEM-encoded custom Certificate Authority certificate
    caFile string
    Path to a custom Certificate Authority certificate
    certData string
    PEM encoded certificate for client auth
    certFile string
    Path to a file containing the PEM encoded certificate for client auth
    endpoints string[]
    esClientAuthentication string
    ES Client Authentication field to be used with the JWT token
    insecure boolean
    Disable TLS certificate validation
    keyData string
    PEM encoded private key for client auth
    keyFile 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_authentication str
    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.
    apiKey String
    API Key to use for authentication to Elasticsearch
    bearerToken String
    Bearer Token to use for authentication to Elasticsearch
    caData String
    PEM-encoded custom Certificate Authority certificate
    caFile String
    Path to a custom Certificate Authority certificate
    certData String
    PEM encoded certificate for client auth
    certFile String
    Path to a file containing the PEM encoded certificate for client auth
    endpoints List<String>
    esClientAuthentication String
    ES Client Authentication field to be used with the JWT token
    insecure Boolean
    Disable TLS certificate validation
    keyData String
    PEM encoded private key for client auth
    keyFile 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.

    Import

    $ pulumi import elasticstack:index/elasticsearchSecurityRoleMapping:ElasticsearchSecurityRoleMapping my_role_mapping <cluster_uuid>/<role mapping name>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    elasticstack logo
    elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic