published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
The Elasticsearch ACL Rule resource models a single ACL Rule for an Aiven Elasticsearch service.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const esUser = new aiven.ServiceUser("esUser", {
project: _var.aiven_project_name,
serviceName: aiven_elasticsearch.es_test.service_name,
username: "documentation-user-1",
});
const esUser2 = new aiven.ServiceUser("esUser2", {
project: _var.aiven_project_name,
serviceName: aiven_elasticsearch.es_test.service_name,
username: "documentation-user-2",
});
const esAclsConfig = new aiven.ElasticSearchAclConfig("esAclsConfig", {
project: _var.aiven_project_name,
serviceName: aiven_elasticsearch.es_test.service_name,
enabled: true,
extendedAcl: false,
});
const aclRules = [
{
username: esUser.username,
index: "index2",
permission: "readwrite",
},
{
username: esUser.username,
index: "index3",
permission: "read",
},
{
username: esUser.username,
index: "index5",
permission: "deny",
},
{
username: esUser2.username,
index: "index3",
permission: "write",
},
{
username: esUser2.username,
index: "index7",
permission: "readwrite",
},
];
const esAclRule: aiven.ElasticSearchAclRule[];
for (const range of Object.entries(aclRules.map((v, k) => [k, v]).reduce((__obj, [, ]) => { ...__obj, [i]: v })).map(([k, v]) => {key: k, value: v})) {
esAclRule.push(new aiven.ElasticSearchAclRule(`esAclRule-${range.key}`, {
project: esAclsConfig.project,
serviceName: esAclsConfig.serviceName,
username: range.value.username,
index: range.value.index,
permission: range.value.permission,
}));
}
import pulumi
import pulumi_aiven as aiven
es_user = aiven.ServiceUser("esUser",
project=var["aiven_project_name"],
service_name=aiven_elasticsearch["es_test"]["service_name"],
username="documentation-user-1")
es_user2 = aiven.ServiceUser("esUser2",
project=var["aiven_project_name"],
service_name=aiven_elasticsearch["es_test"]["service_name"],
username="documentation-user-2")
es_acls_config = aiven.ElasticSearchAclConfig("esAclsConfig",
project=var["aiven_project_name"],
service_name=aiven_elasticsearch["es_test"]["service_name"],
enabled=True,
extended_acl=False)
acl_rules = [
{
"username": es_user.username,
"index": "index2",
"permission": "readwrite",
},
{
"username": es_user.username,
"index": "index3",
"permission": "read",
},
{
"username": es_user.username,
"index": "index5",
"permission": "deny",
},
{
"username": es_user2.username,
"index": "index3",
"permission": "write",
},
{
"username": es_user2.username,
"index": "index7",
"permission": "readwrite",
},
]
es_acl_rule = []
for range in [{"key": k, "value": v} for [k, v] in enumerate({i: v for i, v in acl_rules})]:
es_acl_rule.append(aiven.ElasticSearchAclRule(f"esAclRule-{range['key']}",
project=es_acls_config.project,
service_name=es_acls_config.service_name,
username=range["value"]["username"],
index=range["value"]["index"],
permission=range["value"]["permission"]))
Example coming soon!
Create ElasticSearchAclRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ElasticSearchAclRule(name: string, args: ElasticSearchAclRuleArgs, opts?: CustomResourceOptions);@overload
def ElasticSearchAclRule(resource_name: str,
args: ElasticSearchAclRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ElasticSearchAclRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
index: Optional[str] = None,
permission: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
username: Optional[str] = None)func NewElasticSearchAclRule(ctx *Context, name string, args ElasticSearchAclRuleArgs, opts ...ResourceOption) (*ElasticSearchAclRule, error)public ElasticSearchAclRule(string name, ElasticSearchAclRuleArgs args, CustomResourceOptions? opts = null)
public ElasticSearchAclRule(String name, ElasticSearchAclRuleArgs args)
public ElasticSearchAclRule(String name, ElasticSearchAclRuleArgs args, CustomResourceOptions options)
type: aiven:ElasticSearchAclRule
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 ElasticSearchAclRuleArgs
- 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 ElasticSearchAclRuleArgs
- 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 ElasticSearchAclRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ElasticSearchAclRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ElasticSearchAclRuleArgs
- 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 elasticSearchAclRuleResource = new Aiven.ElasticSearchAclRule("elasticSearchAclRuleResource", new()
{
Index = "string",
Permission = "string",
Project = "string",
ServiceName = "string",
Username = "string",
});
example, err := aiven.NewElasticSearchAclRule(ctx, "elasticSearchAclRuleResource", &aiven.ElasticSearchAclRuleArgs{
Index: pulumi.String("string"),
Permission: pulumi.String("string"),
Project: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Username: pulumi.String("string"),
})
var elasticSearchAclRuleResource = new ElasticSearchAclRule("elasticSearchAclRuleResource", ElasticSearchAclRuleArgs.builder()
.index("string")
.permission("string")
.project("string")
.serviceName("string")
.username("string")
.build());
elastic_search_acl_rule_resource = aiven.ElasticSearchAclRule("elasticSearchAclRuleResource",
index="string",
permission="string",
project="string",
service_name="string",
username="string")
const elasticSearchAclRuleResource = new aiven.ElasticSearchAclRule("elasticSearchAclRuleResource", {
index: "string",
permission: "string",
project: "string",
serviceName: "string",
username: "string",
});
type: aiven:ElasticSearchAclRule
properties:
index: string
permission: string
project: string
serviceName: string
username: string
ElasticSearchAclRule 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 ElasticSearchAclRule resource accepts the following input properties:
- Index string
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - Permission string
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Username string
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Index string
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - Permission string
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Username string
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index String
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission String
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username String
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index string
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission string
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username string
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index str
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission str
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project str
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username str
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index String
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission String
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username String
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ElasticSearchAclRule 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 ElasticSearchAclRule Resource
Get an existing ElasticSearchAclRule 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?: ElasticSearchAclRuleState, opts?: CustomResourceOptions): ElasticSearchAclRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
index: Optional[str] = None,
permission: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
username: Optional[str] = None) -> ElasticSearchAclRulefunc GetElasticSearchAclRule(ctx *Context, name string, id IDInput, state *ElasticSearchAclRuleState, opts ...ResourceOption) (*ElasticSearchAclRule, error)public static ElasticSearchAclRule Get(string name, Input<string> id, ElasticSearchAclRuleState? state, CustomResourceOptions? opts = null)public static ElasticSearchAclRule get(String name, Output<String> id, ElasticSearchAclRuleState state, CustomResourceOptions options)resources: _: type: aiven:ElasticSearchAclRule 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.
- Index string
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - Permission string
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Username string
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Index string
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - Permission string
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - Project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Username string
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index String
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission String
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username String
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index string
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission string
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project string
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username string
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index str
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission str
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project str
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username str
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- index String
- The index pattern for the ACL entry. Maximum Length:
249. This property cannot be changed, doing so forces recreation of the resource. - permission String
- The permission for the ACL entry. The possible values are
deny,admin,read,readwriteandwrite. - project String
- Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String - Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- username String
- The username for the ACL entry. Maximum Length:
40. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
