1. Packages
  2. Aiven
  3. API Docs
  4. OpenSearchAclConfig
Aiven v6.13.0 published on Monday, Mar 25, 2024 by Pulumi

aiven.OpenSearchAclConfig

Explore with Pulumi AI

aiven logo
Aiven v6.13.0 published on Monday, Mar 25, 2024 by Pulumi

    The OpenSearch ACL Config resource allows the creation and management of Aiven OpenSearch ACLs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const fooProject = aiven.getProject({
        project: "example_project",
    });
    const bar = new aiven.OpenSearch("bar", {
        project: fooProject.then(fooProject => fooProject.project),
        cloudName: "google-europe-west1",
        plan: "startup-4",
        serviceName: "example_service_name",
        maintenanceWindowDow: "monday",
        maintenanceWindowTime: "10:00:00",
    });
    const fooOpensearchUser = new aiven.OpensearchUser("fooOpensearchUser", {
        serviceName: bar.serviceName,
        project: fooProject.then(fooProject => fooProject.project),
        username: "user-example",
    });
    const fooOpenSearchAclConfig = new aiven.OpenSearchAclConfig("fooOpenSearchAclConfig", {
        project: fooProject.then(fooProject => fooProject.project),
        serviceName: bar.serviceName,
        enabled: true,
        extendedAcl: false,
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    foo_project = aiven.get_project(project="example_project")
    bar = aiven.OpenSearch("bar",
        project=foo_project.project,
        cloud_name="google-europe-west1",
        plan="startup-4",
        service_name="example_service_name",
        maintenance_window_dow="monday",
        maintenance_window_time="10:00:00")
    foo_opensearch_user = aiven.OpensearchUser("fooOpensearchUser",
        service_name=bar.service_name,
        project=foo_project.project,
        username="user-example")
    foo_open_search_acl_config = aiven.OpenSearchAclConfig("fooOpenSearchAclConfig",
        project=foo_project.project,
        service_name=bar.service_name,
        enabled=True,
        extended_acl=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooProject, err := aiven.LookupProject(ctx, &aiven.LookupProjectArgs{
    			Project: "example_project",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		bar, err := aiven.NewOpenSearch(ctx, "bar", &aiven.OpenSearchArgs{
    			Project:               pulumi.String(fooProject.Project),
    			CloudName:             pulumi.String("google-europe-west1"),
    			Plan:                  pulumi.String("startup-4"),
    			ServiceName:           pulumi.String("example_service_name"),
    			MaintenanceWindowDow:  pulumi.String("monday"),
    			MaintenanceWindowTime: pulumi.String("10:00:00"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewOpensearchUser(ctx, "fooOpensearchUser", &aiven.OpensearchUserArgs{
    			ServiceName: bar.ServiceName,
    			Project:     pulumi.String(fooProject.Project),
    			Username:    pulumi.String("user-example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewOpenSearchAclConfig(ctx, "fooOpenSearchAclConfig", &aiven.OpenSearchAclConfigArgs{
    			Project:     pulumi.String(fooProject.Project),
    			ServiceName: bar.ServiceName,
    			Enabled:     pulumi.Bool(true),
    			ExtendedAcl: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var fooProject = Aiven.GetProject.Invoke(new()
        {
            Project = "example_project",
        });
    
        var bar = new Aiven.OpenSearch("bar", new()
        {
            Project = fooProject.Apply(getProjectResult => getProjectResult.Project),
            CloudName = "google-europe-west1",
            Plan = "startup-4",
            ServiceName = "example_service_name",
            MaintenanceWindowDow = "monday",
            MaintenanceWindowTime = "10:00:00",
        });
    
        var fooOpensearchUser = new Aiven.OpensearchUser("fooOpensearchUser", new()
        {
            ServiceName = bar.ServiceName,
            Project = fooProject.Apply(getProjectResult => getProjectResult.Project),
            Username = "user-example",
        });
    
        var fooOpenSearchAclConfig = new Aiven.OpenSearchAclConfig("fooOpenSearchAclConfig", new()
        {
            Project = fooProject.Apply(getProjectResult => getProjectResult.Project),
            ServiceName = bar.ServiceName,
            Enabled = true,
            ExtendedAcl = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.AivenFunctions;
    import com.pulumi.aiven.inputs.GetProjectArgs;
    import com.pulumi.aiven.OpenSearch;
    import com.pulumi.aiven.OpenSearchArgs;
    import com.pulumi.aiven.OpensearchUser;
    import com.pulumi.aiven.OpensearchUserArgs;
    import com.pulumi.aiven.OpenSearchAclConfig;
    import com.pulumi.aiven.OpenSearchAclConfigArgs;
    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 fooProject = AivenFunctions.getProject(GetProjectArgs.builder()
                .project("example_project")
                .build());
    
            var bar = new OpenSearch("bar", OpenSearchArgs.builder()        
                .project(fooProject.applyValue(getProjectResult -> getProjectResult.project()))
                .cloudName("google-europe-west1")
                .plan("startup-4")
                .serviceName("example_service_name")
                .maintenanceWindowDow("monday")
                .maintenanceWindowTime("10:00:00")
                .build());
    
            var fooOpensearchUser = new OpensearchUser("fooOpensearchUser", OpensearchUserArgs.builder()        
                .serviceName(bar.serviceName())
                .project(fooProject.applyValue(getProjectResult -> getProjectResult.project()))
                .username("user-example")
                .build());
    
            var fooOpenSearchAclConfig = new OpenSearchAclConfig("fooOpenSearchAclConfig", OpenSearchAclConfigArgs.builder()        
                .project(fooProject.applyValue(getProjectResult -> getProjectResult.project()))
                .serviceName(bar.serviceName())
                .enabled(true)
                .extendedAcl(false)
                .build());
    
        }
    }
    
    resources:
      bar:
        type: aiven:OpenSearch
        properties:
          project: ${fooProject.project}
          cloudName: google-europe-west1
          plan: startup-4
          serviceName: example_service_name
          maintenanceWindowDow: monday
          maintenanceWindowTime: 10:00:00
      fooOpensearchUser:
        type: aiven:OpensearchUser
        properties:
          serviceName: ${bar.serviceName}
          project: ${fooProject.project}
          username: user-example
      fooOpenSearchAclConfig:
        type: aiven:OpenSearchAclConfig
        properties:
          project: ${fooProject.project}
          serviceName: ${bar.serviceName}
          enabled: true
          extendedAcl: false
    variables:
      fooProject:
        fn::invoke:
          Function: aiven:getProject
          Arguments:
            project: example_project
    

    Create OpenSearchAclConfig Resource

    new OpenSearchAclConfig(name: string, args: OpenSearchAclConfigArgs, opts?: CustomResourceOptions);
    @overload
    def OpenSearchAclConfig(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            enabled: Optional[bool] = None,
                            extended_acl: Optional[bool] = None,
                            project: Optional[str] = None,
                            service_name: Optional[str] = None)
    @overload
    def OpenSearchAclConfig(resource_name: str,
                            args: OpenSearchAclConfigArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewOpenSearchAclConfig(ctx *Context, name string, args OpenSearchAclConfigArgs, opts ...ResourceOption) (*OpenSearchAclConfig, error)
    public OpenSearchAclConfig(string name, OpenSearchAclConfigArgs args, CustomResourceOptions? opts = null)
    public OpenSearchAclConfig(String name, OpenSearchAclConfigArgs args)
    public OpenSearchAclConfig(String name, OpenSearchAclConfigArgs args, CustomResourceOptions options)
    
    type: aiven:OpenSearchAclConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args OpenSearchAclConfigArgs
    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 OpenSearchAclConfigArgs
    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 OpenSearchAclConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OpenSearchAclConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OpenSearchAclConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    OpenSearchAclConfig 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 OpenSearchAclConfig resource accepts the following input properties:

    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    Enabled bool
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    ExtendedAcl 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. The default value is true.
    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    Enabled bool
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    ExtendedAcl 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. The default value is true.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled Boolean
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    extendedAcl 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. The default value is true.
    project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled boolean
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    extendedAcl 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. The default value is true.
    project str
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled bool
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    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. The default value is true.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled Boolean
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    extendedAcl 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. The default value is true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OpenSearchAclConfig 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 OpenSearchAclConfig Resource

    Get an existing OpenSearchAclConfig 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?: OpenSearchAclConfigState, opts?: CustomResourceOptions): OpenSearchAclConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            extended_acl: Optional[bool] = None,
            project: Optional[str] = None,
            service_name: Optional[str] = None) -> OpenSearchAclConfig
    func GetOpenSearchAclConfig(ctx *Context, name string, id IDInput, state *OpenSearchAclConfigState, opts ...ResourceOption) (*OpenSearchAclConfig, error)
    public static OpenSearchAclConfig Get(string name, Input<string> id, OpenSearchAclConfigState? state, CustomResourceOptions? opts = null)
    public static OpenSearchAclConfig get(String name, Output<String> id, OpenSearchAclConfigState 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:
    Enabled bool
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    ExtendedAcl 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. The default value is true.
    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    Enabled bool
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    ExtendedAcl 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. The default value is true.
    Project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled Boolean
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    extendedAcl 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. The default value is true.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled boolean
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    extendedAcl 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. The default value is true.
    project string
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled bool
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    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. The default value is true.
    project str
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.
    enabled Boolean
    Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access. The default value is true.
    extendedAcl 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. The default value is true.
    project String
    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property 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. Changing this property forces recreation of the resource.

    Import

    $ pulumi import aiven:index/openSearchAclConfig:OpenSearchAclConfig foo project/service_name
    

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.13.0 published on Monday, Mar 25, 2024 by Pulumi