import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an AWS OpenSearch Application resource. OpenSearch Applications provide a user interface for interacting with OpenSearch data and managing OpenSearch resources. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.opensearch.Application("example", {name: "my-opensearch-app"}); * ``` * * ### Application with Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.opensearch.Application("example", { * appConfigs: [ * { * key: "opensearchDashboards.dashboardAdmin.users", * value: "admin-user", * }, * { * key: "opensearchDashboards.dashboardAdmin.groups", * value: "admin-group", * }, * ], * name: "my-opensearch-app", * tags: { * Environment: "production", * Team: "data-platform", * }, * }); * ``` * * ### Application with Data Sources * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.opensearch.Domain("example", { * clusterConfig: { * instanceType: "t3.small.search", * }, * ebsOptions: { * ebsEnabled: true, * volumeSize: 20, * }, * domainName: "example-domain", * engineVersion: "OpenSearch_2.3", * }); * const exampleApplication = new aws.opensearch.Application("example", { * dataSources: [{ * dataSourceArn: example.arn, * dataSourceDescription: "Primary OpenSearch domain for analytics", * }], * name: "my-opensearch-app", * tags: { * Environment: "production", * }, * }); * ``` * * ### Application with IAM Identity Center Integration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * // Data sources for account and region information * const example = aws.ssoadmin.getInstances({}); * const current = aws.getCallerIdentity({}); * const currentGetRegion = aws.getRegion({}); * // IAM Policy for OpenSearch Application Identity Center Integration * const opensearchIdentityCenter = new aws.iam.Policy("opensearch_identity_center", { * name: "opensearch-identity-center-policy", * description: "Policy for OpenSearch Application Identity Center integration", * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [ * { * Sid: "IdentityStoreOpenSearchDomainConnectivity", * Effect: "Allow", * Action: [ * "identitystore:DescribeUser", * "identitystore:ListGroupMembershipsForMember", * "identitystore:DescribeGroup", * ], * Resource: "*", * Condition: { * "ForAnyValue:StringEquals": { * "aws:CalledViaLast": "es.amazonaws.com", * }, * }, * }, * { * Sid: "OpenSearchDomain", * Effect: "Allow", * Action: ["es:ESHttp*"], * Resource: "*", * }, * { * Sid: "OpenSearchServerless", * Effect: "Allow", * Action: ["aoss:APIAccessAll"], * Resource: "*", * }, * ], * }), * }); * // IAM Role for OpenSearch Application * const opensearchApplication = new aws.iam.Role("opensearch_application", { * name: "opensearch-application-role", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [ * { * Effect: "Allow", * Principal: { * Service: "application.opensearchservice.amazonaws.com", * }, * Action: "sts:AssumeRole", * }, * { * Effect: "Allow", * Principal: { * Service: "application.opensearchservice.amazonaws.com", * }, * Action: "sts:SetContext", * Condition: { * "ForAllValues:ArnEquals": { * "sts:RequestContextProviders": Promise.all([current, currentGetRegion]).then(([current, currentGetRegion]) => `arn:aws:iam::${current.accountId}:oidc-provider/portal.sso.${currentGetRegion.id}.amazonaws.com/apl/*`), * }, * }, * }, * ], * }), * }); * // Attach policy to role * const opensearchIdentityCenterRolePolicyAttachment = new aws.iam.RolePolicyAttachment("opensearch_identity_center", { * role: opensearchApplication.name, * policyArn: opensearchIdentityCenter.arn, * }); * const exampleApplication = new aws.opensearch.Application("example", { * iamIdentityCenterOptions: { * enabled: true, * iamIdentityCenterInstanceArn: example.then(example => example.arns?.[0]), * iamRoleForIdentityCenterApplicationArn: opensearchApplication.arn, * }, * name: "my-opensearch-app", * tags: { * Environment: "production", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import OpenSearch applications using the `id`. For example: * * ```sh * $ pulumi import aws:opensearch/application:Application example app-1234567890abcdef0 * ``` */ export declare class Application extends pulumi.CustomResource { /** * Get an existing Application resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ApplicationState, opts?: pulumi.CustomResourceOptions): Application; /** * Returns true if the given object is an instance of Application. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Application; /** * Configuration block(s) for OpenSearch application settings. See App Config below. */ readonly appConfigs: pulumi.Output; /** * ARN of the OpenSearch application. */ readonly arn: pulumi.Output; /** * Configuration block(s) for data sources to link to the OpenSearch application. See Data Source below. */ readonly dataSources: pulumi.Output; /** * Endpoint URL of the OpenSearch application. */ readonly endpoint: pulumi.Output; /** * Configuration block for integrating AWS IAM Identity Center with the OpenSearch application. See IAM Identity Center Options below. */ readonly iamIdentityCenterOptions: pulumi.Output; /** * ARN of the KMS key used to encrypt the application's data at rest. */ readonly kmsKeyArn: pulumi.Output; /** * The unique name of the OpenSearch application. Names must be unique within an AWS Region for each account. Must be between 3 and 30 characters, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; readonly timeouts: pulumi.Output; /** * Create a Application resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ApplicationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Application resources. */ export interface ApplicationState { /** * Configuration block(s) for OpenSearch application settings. See App Config below. */ appConfigs?: pulumi.Input[] | undefined>; /** * ARN of the OpenSearch application. */ arn?: pulumi.Input; /** * Configuration block(s) for data sources to link to the OpenSearch application. See Data Source below. */ dataSources?: pulumi.Input[] | undefined>; /** * Endpoint URL of the OpenSearch application. */ endpoint?: pulumi.Input; /** * Configuration block for integrating AWS IAM Identity Center with the OpenSearch application. See IAM Identity Center Options below. */ iamIdentityCenterOptions?: pulumi.Input; /** * ARN of the KMS key used to encrypt the application's data at rest. */ kmsKeyArn?: pulumi.Input; /** * The unique name of the OpenSearch application. Names must be unique within an AWS Region for each account. Must be between 3 and 30 characters, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a Application resource. */ export interface ApplicationArgs { /** * Configuration block(s) for OpenSearch application settings. See App Config below. */ appConfigs?: pulumi.Input[] | undefined>; /** * Configuration block(s) for data sources to link to the OpenSearch application. See Data Source below. */ dataSources?: pulumi.Input[] | undefined>; /** * Configuration block for integrating AWS IAM Identity Center with the OpenSearch application. See IAM Identity Center Options below. */ iamIdentityCenterOptions?: pulumi.Input; /** * ARN of the KMS key used to encrypt the application's data at rest. */ kmsKeyArn?: pulumi.Input; /** * The unique name of the OpenSearch application. Names must be unique within an AWS Region for each account. Must be between 3 and 30 characters, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; } //# sourceMappingURL=application.d.ts.map