1. Packages
  2. Aiven Provider
  3. API Docs
  4. OpenSearchAclConfig
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

aiven.OpenSearchAclConfig

Explore with Pulumi AI

aiven logo
Aiven v6.28.0 published on Friday, Nov 15, 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 foo = aiven.getProject({
        project: "example_project",
    });
    const bar = new aiven.OpenSearch("bar", {
        project: foo.then(foo => foo.project),
        cloudName: "google-europe-west1",
        plan: "startup-4",
        serviceName: "example_service_name",
        maintenanceWindowDow: "monday",
        maintenanceWindowTime: "10:00:00",
    });
    const fooOpensearchUser = new aiven.OpensearchUser("foo", {
        serviceName: bar.serviceName,
        project: foo.then(foo => foo.project),
        username: "user-example",
    });
    const fooOpenSearchAclConfig = new aiven.OpenSearchAclConfig("foo", {
        project: foo.then(foo => foo.project),
        serviceName: bar.serviceName,
        enabled: true,
        extendedAcl: false,
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    foo = aiven.get_project(project="example_project")
    bar = aiven.OpenSearch("bar",
        project=foo.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("foo",
        service_name=bar.service_name,
        project=foo.project,
        username="user-example")
    foo_open_search_acl_config = aiven.OpenSearchAclConfig("foo",
        project=foo.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 {
    		foo, 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(foo.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, "foo", &aiven.OpensearchUserArgs{
    			ServiceName: bar.ServiceName,
    			Project:     pulumi.String(foo.Project),
    			Username:    pulumi.String("user-example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewOpenSearchAclConfig(ctx, "foo", &aiven.OpenSearchAclConfigArgs{
    			Project:     pulumi.String(foo.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 foo = Aiven.GetProject.Invoke(new()
        {
            Project = "example_project",
        });
    
        var bar = new Aiven.OpenSearch("bar", new()
        {
            Project = foo.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("foo", new()
        {
            ServiceName = bar.ServiceName,
            Project = foo.Apply(getProjectResult => getProjectResult.Project),
            Username = "user-example",
        });
    
        var fooOpenSearchAclConfig = new Aiven.OpenSearchAclConfig("foo", new()
        {
            Project = foo.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 foo = AivenFunctions.getProject(GetProjectArgs.builder()
                .project("example_project")
                .build());
    
            var bar = new OpenSearch("bar", OpenSearchArgs.builder()
                .project(foo.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(foo.applyValue(getProjectResult -> getProjectResult.project()))
                .username("user-example")
                .build());
    
            var fooOpenSearchAclConfig = new OpenSearchAclConfig("fooOpenSearchAclConfig", OpenSearchAclConfigArgs.builder()
                .project(foo.applyValue(getProjectResult -> getProjectResult.project()))
                .serviceName(bar.serviceName())
                .enabled(true)
                .extendedAcl(false)
                .build());
    
        }
    }
    
    resources:
      bar:
        type: aiven:OpenSearch
        properties:
          project: ${foo.project}
          cloudName: google-europe-west1
          plan: startup-4
          serviceName: example_service_name
          maintenanceWindowDow: monday
          maintenanceWindowTime: 10:00:00
      fooOpensearchUser:
        type: aiven:OpensearchUser
        name: foo
        properties:
          serviceName: ${bar.serviceName}
          project: ${foo.project}
          username: user-example
      fooOpenSearchAclConfig:
        type: aiven:OpenSearchAclConfig
        name: foo
        properties:
          project: ${foo.project}
          serviceName: ${bar.serviceName}
          enabled: true
          extendedAcl: false
    variables:
      foo:
        fn::invoke:
          Function: aiven:getProject
          Arguments:
            project: example_project
    

    Create OpenSearchAclConfig Resource

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

    Constructor syntax

    new OpenSearchAclConfig(name: string, args: OpenSearchAclConfigArgs, opts?: CustomResourceOptions);
    @overload
    def OpenSearchAclConfig(resource_name: str,
                            args: OpenSearchAclConfigArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def OpenSearchAclConfig(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            project: Optional[str] = None,
                            service_name: Optional[str] = None,
                            enabled: Optional[bool] = None,
                            extended_acl: Optional[bool] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var openSearchAclConfigResource = new Aiven.OpenSearchAclConfig("openSearchAclConfigResource", new()
    {
        Project = "string",
        ServiceName = "string",
        Enabled = false,
        ExtendedAcl = false,
    });
    
    example, err := aiven.NewOpenSearchAclConfig(ctx, "openSearchAclConfigResource", &aiven.OpenSearchAclConfigArgs{
    	Project:     pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	ExtendedAcl: pulumi.Bool(false),
    })
    
    var openSearchAclConfigResource = new OpenSearchAclConfig("openSearchAclConfigResource", OpenSearchAclConfigArgs.builder()
        .project("string")
        .serviceName("string")
        .enabled(false)
        .extendedAcl(false)
        .build());
    
    open_search_acl_config_resource = aiven.OpenSearchAclConfig("openSearchAclConfigResource",
        project="string",
        service_name="string",
        enabled=False,
        extended_acl=False)
    
    const openSearchAclConfigResource = new aiven.OpenSearchAclConfig("openSearchAclConfigResource", {
        project: "string",
        serviceName: "string",
        enabled: false,
        extendedAcl: false,
    });
    
    type: aiven:OpenSearchAclConfig
    properties:
        enabled: false
        extendedAcl: false
        project: string
        serviceName: string
    

    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

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

    The OpenSearchAclConfig resource accepts the following input properties:

    Project string
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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
    The name of 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
    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

    TERRAFORM IMPORT AIVEN_OPENSEARCH_ACL_CONFIG.FOO project/service_name

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

    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.28.0 published on Friday, Nov 15, 2024 by Pulumi