1. Packages
  2. stackit
  3. API Docs
  4. OpensearchCredential
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    OpenSearch credential resource schema. Must have a region specified in the provider configuration.

    Example Usage

    resource "stackit_opensearch_credential" "example" {
      project_id  = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    
    # Only use the import statement, if you want to import an existing opensearch credential
    import {
      to = stackit_opensearch_credential.import-example
      id = "${var.project_id},${var.instance_id},${var.credential_id}"
    }
    

    Create OpensearchCredential Resource

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

    Constructor syntax

    new OpensearchCredential(name: string, args: OpensearchCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def OpensearchCredential(resource_name: str,
                             args: OpensearchCredentialArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def OpensearchCredential(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             instance_id: Optional[str] = None,
                             project_id: Optional[str] = None)
    func NewOpensearchCredential(ctx *Context, name string, args OpensearchCredentialArgs, opts ...ResourceOption) (*OpensearchCredential, error)
    public OpensearchCredential(string name, OpensearchCredentialArgs args, CustomResourceOptions? opts = null)
    public OpensearchCredential(String name, OpensearchCredentialArgs args)
    public OpensearchCredential(String name, OpensearchCredentialArgs args, CustomResourceOptions options)
    
    type: stackit:OpensearchCredential
    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 OpensearchCredentialArgs
    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 OpensearchCredentialArgs
    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 OpensearchCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OpensearchCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OpensearchCredentialArgs
    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 opensearchCredentialResource = new Stackit.OpensearchCredential("opensearchCredentialResource", new()
    {
        InstanceId = "string",
        ProjectId = "string",
    });
    
    example, err := stackit.NewOpensearchCredential(ctx, "opensearchCredentialResource", &stackit.OpensearchCredentialArgs{
    	InstanceId: pulumi.String("string"),
    	ProjectId:  pulumi.String("string"),
    })
    
    var opensearchCredentialResource = new OpensearchCredential("opensearchCredentialResource", OpensearchCredentialArgs.builder()
        .instanceId("string")
        .projectId("string")
        .build());
    
    opensearch_credential_resource = stackit.OpensearchCredential("opensearchCredentialResource",
        instance_id="string",
        project_id="string")
    
    const opensearchCredentialResource = new stackit.OpensearchCredential("opensearchCredentialResource", {
        instanceId: "string",
        projectId: "string",
    });
    
    type: stackit:OpensearchCredential
    properties:
        instanceId: string
        projectId: string
    

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

    InstanceId string
    ID of the OpenSearch instance.
    ProjectId string
    STACKIT Project ID to which the instance is associated.
    InstanceId string
    ID of the OpenSearch instance.
    ProjectId string
    STACKIT Project ID to which the instance is associated.
    instanceId String
    ID of the OpenSearch instance.
    projectId String
    STACKIT Project ID to which the instance is associated.
    instanceId string
    ID of the OpenSearch instance.
    projectId string
    STACKIT Project ID to which the instance is associated.
    instance_id str
    ID of the OpenSearch instance.
    project_id str
    STACKIT Project ID to which the instance is associated.
    instanceId String
    ID of the OpenSearch instance.
    projectId String
    STACKIT Project ID to which the instance is associated.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OpensearchCredential resource produces the following output properties:

    CredentialId string
    The credential's ID.
    Host string
    Hosts List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    Port int
    Scheme string
    Uri string
    Username string
    CredentialId string
    The credential's ID.
    Host string
    Hosts []string
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    Port int
    Scheme string
    Uri string
    Username string
    credentialId String
    The credential's ID.
    host String
    hosts List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    port Integer
    scheme String
    uri String
    username String
    credentialId string
    The credential's ID.
    host string
    hosts string[]
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    port number
    scheme string
    uri string
    username string
    credential_id str
    The credential's ID.
    host str
    hosts Sequence[str]
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    port int
    scheme str
    uri str
    username str
    credentialId String
    The credential's ID.
    host String
    hosts List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    port Number
    scheme String
    uri String
    username String

    Look up Existing OpensearchCredential Resource

    Get an existing OpensearchCredential 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?: OpensearchCredentialState, opts?: CustomResourceOptions): OpensearchCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            credential_id: Optional[str] = None,
            host: Optional[str] = None,
            hosts: Optional[Sequence[str]] = None,
            instance_id: Optional[str] = None,
            password: Optional[str] = None,
            port: Optional[int] = None,
            project_id: Optional[str] = None,
            scheme: Optional[str] = None,
            uri: Optional[str] = None,
            username: Optional[str] = None) -> OpensearchCredential
    func GetOpensearchCredential(ctx *Context, name string, id IDInput, state *OpensearchCredentialState, opts ...ResourceOption) (*OpensearchCredential, error)
    public static OpensearchCredential Get(string name, Input<string> id, OpensearchCredentialState? state, CustomResourceOptions? opts = null)
    public static OpensearchCredential get(String name, Output<String> id, OpensearchCredentialState state, CustomResourceOptions options)
    resources:  _:    type: stackit:OpensearchCredential    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.
    The following state arguments are supported:
    CredentialId string
    The credential's ID.
    Host string
    Hosts List<string>
    InstanceId string
    ID of the OpenSearch instance.
    Password string
    Port int
    ProjectId string
    STACKIT Project ID to which the instance is associated.
    Scheme string
    Uri string
    Username string
    CredentialId string
    The credential's ID.
    Host string
    Hosts []string
    InstanceId string
    ID of the OpenSearch instance.
    Password string
    Port int
    ProjectId string
    STACKIT Project ID to which the instance is associated.
    Scheme string
    Uri string
    Username string
    credentialId String
    The credential's ID.
    host String
    hosts List<String>
    instanceId String
    ID of the OpenSearch instance.
    password String
    port Integer
    projectId String
    STACKIT Project ID to which the instance is associated.
    scheme String
    uri String
    username String
    credentialId string
    The credential's ID.
    host string
    hosts string[]
    instanceId string
    ID of the OpenSearch instance.
    password string
    port number
    projectId string
    STACKIT Project ID to which the instance is associated.
    scheme string
    uri string
    username string
    credential_id str
    The credential's ID.
    host str
    hosts Sequence[str]
    instance_id str
    ID of the OpenSearch instance.
    password str
    port int
    project_id str
    STACKIT Project ID to which the instance is associated.
    scheme str
    uri str
    username str
    credentialId String
    The credential's ID.
    host String
    hosts List<String>
    instanceId String
    ID of the OpenSearch instance.
    password String
    port Number
    projectId String
    STACKIT Project ID to which the instance is associated.
    scheme String
    uri String
    username String

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.