ElasticSearchAcl
# Elasticsearch ACL Resource
The Elasticsearch ACL resource allows the creation and management of ACLs for an Aiven Elasticsearch service.
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var es_acls = new Aiven.ElasticSearchAcl("es-acls", new Aiven.ElasticSearchAclArgs
{
Project = aiven_project.Es_project.Project,
ServiceName = aiven_service.Es.Service_name,
Enabled = true,
ExtendedAcl = false,
Acls =
{
new Aiven.Inputs.ElasticSearchAclAclArgs
{
Username = aiven_service_user.Es_user.Username,
Rules =
{
new Aiven.Inputs.ElasticSearchAclAclRuleArgs
{
Index = "_*",
Permission = "admin",
},
new Aiven.Inputs.ElasticSearchAclAclRuleArgs
{
Index = "*",
Permission = "admin",
},
},
},
new Aiven.Inputs.ElasticSearchAclAclArgs
{
Username = "avnadmin",
Rules =
{
new Aiven.Inputs.ElasticSearchAclAclRuleArgs
{
Index = "_*",
Permission = "read",
},
new Aiven.Inputs.ElasticSearchAclAclRuleArgs
{
Index = "*",
Permission = "read",
},
},
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v3/go/aiven"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.NewElasticSearchAcl(ctx, "es_acls", &aiven.ElasticSearchAclArgs{
Project: pulumi.Any(aiven_project.Es - project.Project),
ServiceName: pulumi.Any(aiven_service.Es.Service_name),
Enabled: pulumi.Bool(true),
ExtendedAcl: pulumi.Bool(false),
Acls: aiven.ElasticSearchAclAclArray{
&aiven.ElasticSearchAclAclArgs{
Username: pulumi.Any(aiven_service_user.Es - user.Username),
Rules: aiven.ElasticSearchAclAclRuleArray{
&aiven.ElasticSearchAclAclRuleArgs{
Index: pulumi.String("_*"),
Permission: pulumi.String("admin"),
},
&aiven.ElasticSearchAclAclRuleArgs{
Index: pulumi.String("*"),
Permission: pulumi.String("admin"),
},
},
},
&aiven.ElasticSearchAclAclArgs{
Username: pulumi.String("avnadmin"),
Rules: aiven.ElasticSearchAclAclRuleArray{
&aiven.ElasticSearchAclAclRuleArgs{
Index: pulumi.String("_*"),
Permission: pulumi.String("read"),
},
&aiven.ElasticSearchAclAclRuleArgs{
Index: pulumi.String("*"),
Permission: pulumi.String("read"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_aiven as aiven
es_acls = aiven.ElasticSearchAcl("es-acls",
project=aiven_project["es-project"]["project"],
service_name=aiven_service["es"]["service_name"],
enabled=True,
extended_acl=False,
acls=[
aiven.ElasticSearchAclAclArgs(
username=aiven_service_user["es-user"]["username"],
rules=[
aiven.ElasticSearchAclAclRuleArgs(
index="_*",
permission="admin",
),
aiven.ElasticSearchAclAclRuleArgs(
index="*",
permission="admin",
),
],
),
aiven.ElasticSearchAclAclArgs(
username="avnadmin",
rules=[
aiven.ElasticSearchAclAclRuleArgs(
index="_*",
permission="read",
),
aiven.ElasticSearchAclAclRuleArgs(
index="*",
permission="read",
),
],
),
])
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const es_acls = new aiven.ElasticSearchAcl("es-acls", {
project: aiven_project["es-project"].project,
serviceName: aiven_service.es.service_name,
enabled: true,
extendedAcl: false,
acls: [
{
username: aiven_service_user["es-user"].username,
rules: [
{
index: "_*",
permission: "admin",
},
{
index: "*",
permission: "admin",
},
],
},
{
username: "avnadmin",
rules: [
{
index: "_*",
permission: "read",
},
{
index: "*",
permission: "read",
},
],
},
],
});
Create a ElasticSearchAcl Resource
new ElasticSearchAcl(name: string, args: ElasticSearchAclArgs, opts?: CustomResourceOptions);
def ElasticSearchAcl(resource_name: str, opts: Optional[ResourceOptions] = None, acls: Optional[Sequence[ElasticSearchAclAclArgs]] = None, enabled: Optional[bool] = None, extended_acl: Optional[bool] = None, project: Optional[str] = None, service_name: Optional[str] = None)
func NewElasticSearchAcl(ctx *Context, name string, args ElasticSearchAclArgs, opts ...ResourceOption) (*ElasticSearchAcl, error)
public ElasticSearchAcl(string name, ElasticSearchAclArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args ElasticSearchAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ElasticSearchAclArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ElasticSearchAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ElasticSearchAcl Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ElasticSearchAcl resource accepts the following input properties:
- Project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- Service
Name string Service to link the Elasticsearch ACLs to
- Acls
List<Elastic
Search Acl Acl Args> List of Elasticsearch ACLs
- Enabled bool
enables of disables Elasticsearch ACL’s.
- Extended
Acl bool Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- Project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- Service
Name string Service to link the Elasticsearch ACLs to
- Acls
[]Elastic
Search Acl Acl List of Elasticsearch ACLs
- Enabled bool
enables of disables Elasticsearch ACL’s.
- Extended
Acl bool Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- service
Name string Service to link the Elasticsearch ACLs to
- acls
Elastic
Search Acl Acl[] List of Elasticsearch ACLs
- enabled boolean
enables of disables Elasticsearch ACL’s.
- extended
Acl boolean Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- project str
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- service_
name str Service to link the Elasticsearch ACLs to
- acls
Sequence[Elastic
Search Acl Acl Args] List of Elasticsearch ACLs
- enabled bool
enables of disables Elasticsearch ACL’s.
- extended_
acl bool Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
Outputs
All input properties are implicitly available as output properties. Additionally, the ElasticSearchAcl 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 str
- The provider-assigned unique ID for this managed resource.
Look up an Existing ElasticSearchAcl Resource
Get an existing ElasticSearchAcl 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?: ElasticSearchAclState, opts?: CustomResourceOptions): ElasticSearchAcl
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, acls: Optional[Sequence[ElasticSearchAclAclArgs]] = None, enabled: Optional[bool] = None, extended_acl: Optional[bool] = None, project: Optional[str] = None, service_name: Optional[str] = None) -> ElasticSearchAcl
func GetElasticSearchAcl(ctx *Context, name string, id IDInput, state *ElasticSearchAclState, opts ...ResourceOption) (*ElasticSearchAcl, error)
public static ElasticSearchAcl Get(string name, Input<string> id, ElasticSearchAclState? state, CustomResourceOptions? opts = null)
- 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.
The following state arguments are supported:
- Acls
List<Elastic
Search Acl Acl Args> List of Elasticsearch ACLs
- Enabled bool
enables of disables Elasticsearch ACL’s.
- Extended
Acl bool Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- Project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- Service
Name string Service to link the Elasticsearch ACLs to
- Acls
[]Elastic
Search Acl Acl List of Elasticsearch ACLs
- Enabled bool
enables of disables Elasticsearch ACL’s.
- Extended
Acl bool Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- Project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- Service
Name string Service to link the Elasticsearch ACLs to
- acls
Elastic
Search Acl Acl[] List of Elasticsearch ACLs
- enabled boolean
enables of disables Elasticsearch ACL’s.
- extended
Acl boolean Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- service
Name string Service to link the Elasticsearch ACLs to
- acls
Sequence[Elastic
Search Acl Acl Args] List of Elasticsearch ACLs
- enabled bool
enables of disables Elasticsearch ACL’s.
- extended_
acl bool Index rules can be applied in a limited fashion to the _mget, _msearch and _bulk APIs (and only those) by enabling the ExtendedAcl option for the service. When it is enabled, users can use these APIs as long as all operations only target indexes they have been granted access to.
- project str
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly.- service_
name str Service to link the Elasticsearch ACLs to
Supporting Types
ElasticSearchAclAcl
ElasticSearchAclAclRule
- Index string
- Permission string
- Index string
- Permission string
- index string
- permission string
- index str
- permission str
Package Details
- Repository
- https://github.com/pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aiven
Terraform Provider.