Aiven

Pulumi Official
Package maintained by Pulumi
v4.5.1 published on Friday, Apr 22, 2022 by Pulumi

ElasticSearchAclRule

The Elasticsearch ACL Rule resource models a single ACL Rule for an Aiven Elasticsearch service.

Example Usage

Coming soon!

Coming soon!

Coming soon!

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"]))
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,
    }));
}

Coming soon!

Create a ElasticSearchAclRule Resource

new ElasticSearchAclRule(name: string, args: ElasticSearchAclRuleArgs, opts?: CustomResourceOptions);
@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)
@overload
def ElasticSearchAclRule(resource_name: str,
                         args: ElasticSearchAclRuleArgs,
                         opts: Optional[ResourceOptions] = 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.

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.

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

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, readwrite and write.

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.

ServiceName 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, readwrite and write.

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.

ServiceName 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, readwrite and write.

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.

serviceName 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, readwrite and write.

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.

serviceName 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, readwrite and write.

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, readwrite and write.

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.

serviceName 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 an 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) -> ElasticSearchAclRule
func 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)
Resource lookup is not supported in YAML
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:
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, readwrite and write.

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.

ServiceName 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, readwrite and write.

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.

ServiceName 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, readwrite and write.

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.

serviceName 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, readwrite and write.

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.

serviceName 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, readwrite and write.

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, readwrite and write.

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.

serviceName 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
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes

This Pulumi package is based on the aiven Terraform Provider.