import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a tenant database (pluggable database, PDB) in an RDS for Oracle CDB instance in the multi-tenant configuration. The DB instance must use the `oracle-ee-cdb` or `oracle-se2-cdb` engine with `multiTenant = true`. See the [AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Concepts.CDBs.html) for details. * * The initial tenant database is created with the DB instance, using its `dbName`, `username`, and password. Use this resource to manage additional tenant databases or to import the initial one. RDS doesn't allow deleting the last tenant database in a DB instance. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Instance("example", { * allocatedStorage: 20, * applyImmediately: true, * dbName: "PDB1", * engine: "oracle-se2-cdb", * engineVersion: "19.0.0.0.ru-2026-07.rur-2026-07.r1", * finalSnapshotIdentifier: "example-final", * identifier: "example", * instanceClass: aws.rds.InstanceType.T3_Small, * licenseModel: "bring-your-own-license", * multiTenant: true, * passwordWo: masterPassword, * passwordWoVersion: 1, * username: "admin", * }); * const exampleTenantDatabase = new aws.rds.TenantDatabase("example", { * dbInstanceIdentifier: example.identifier, * finalSnapshotIdentifier: "example-pdb2-final", * masterUserPasswordWo: tenantPassword, * masterUserPasswordWoVersion: 1, * masterUsername: "pdbadmin", * tenantDbName: "PDB2", * }); * ``` * * ### Password Managed by AWS Secrets Manager * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.TenantDatabase("example", { * dbInstanceIdentifier: exampleAwsDbInstance.identifier, * manageMasterUserPassword: true, * masterUsername: "pdbadmin", * skipFinalSnapshot: true, * tenantDbName: "PDB2", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `tenantDatabaseResourceId` (String) Region-unique, immutable identifier of the tenant database. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import RDS tenant databases using the `tenantDatabaseResourceId`. For example: * * ```sh * $ pulumi import aws:rds/tenantDatabase:TenantDatabase example tdb-ABCDEFGHIJKLMNOPQRSTUVWXYZ * ``` */ export declare class TenantDatabase extends pulumi.CustomResource { /** * Get an existing TenantDatabase 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?: TenantDatabaseState, opts?: pulumi.CustomResourceOptions): TenantDatabase; /** * Check whether an existing TenantDatabase resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: TenantDatabaseState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of TenantDatabase. 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 TenantDatabase; /** * ARN of the tenant database. */ readonly arn: pulumi.Output; /** * Character set of the tenant database. Defaults to `AL32UTF8`. */ readonly characterSetName: pulumi.Output; /** * Identifier of the DB instance that contains the tenant database. */ readonly dbInstanceIdentifier: pulumi.Output; /** * Name of the DB snapshot created when the tenant database is deleted. Required unless `skipFinalSnapshot` is `true`. */ readonly finalSnapshotIdentifier: pulumi.Output; /** * Whether to manage the master user password with AWS Secrets Manager. When `true`, conflicts with `masterUserPassword` and `masterUserPasswordWo`. Turning it off requires one of them. */ readonly manageMasterUserPassword: pulumi.Output; /** * Password for the master user. Stored in the Terraform state. Conflicts with `masterUserPasswordWo`. */ readonly masterUserPassword: pulumi.Output; /** * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. * Password for the master user. Not stored in the Terraform state. Requires `masterUserPasswordWoVersion`. */ readonly masterUserPasswordWo: pulumi.Output; /** * Version of `masterUserPasswordWo`. Change it to update the password. */ readonly masterUserPasswordWoVersion: pulumi.Output; /** * ARN, ID, or alias of the AWS KMS key used to encrypt the Secrets Manager secret when `manageMasterUserPassword` is `true`. Can't be changed while `manageMasterUserPassword` is `true`; turn it off, apply, then turn it back on with the new key. After import, omit it or use the secret's key ARN. Defaults to the `aws/secretsmanager` key. */ readonly masterUserSecretKmsKeyId: pulumi.Output; /** * Secrets Manager secret for the master user password when `manageMasterUserPassword` is `true`. See `masterUserSecret` Block below. */ readonly masterUserSecrets: pulumi.Output; /** * Name of the master user for the tenant database. */ readonly masterUsername: pulumi.Output; /** * National character set of the tenant database. Defaults to `AL16UTF16`. */ readonly ncharCharacterSetName: 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; /** * Whether to skip the final DB snapshot when the tenant database is deleted. Defaults to `false`. */ readonly skipFinalSnapshot: pulumi.Output; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * * > **Note:** One of `manageMasterUserPassword`, `masterUserPassword`, or `masterUserPasswordWo` is required by RDS when creating a tenant database. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Region-unique, immutable identifier of the tenant database. */ readonly tenantDatabaseResourceId: pulumi.Output; /** * Name of the tenant database. Changing it renames the tenant database. * * The following arguments are optional: */ readonly tenantDbName: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a TenantDatabase 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: TenantDatabaseArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TenantDatabase resources. */ export interface TenantDatabaseState { /** * ARN of the tenant database. */ arn?: pulumi.Input; /** * Character set of the tenant database. Defaults to `AL32UTF8`. */ characterSetName?: pulumi.Input; /** * Identifier of the DB instance that contains the tenant database. */ dbInstanceIdentifier?: pulumi.Input; /** * Name of the DB snapshot created when the tenant database is deleted. Required unless `skipFinalSnapshot` is `true`. */ finalSnapshotIdentifier?: pulumi.Input; /** * Whether to manage the master user password with AWS Secrets Manager. When `true`, conflicts with `masterUserPassword` and `masterUserPasswordWo`. Turning it off requires one of them. */ manageMasterUserPassword?: pulumi.Input; /** * Password for the master user. Stored in the Terraform state. Conflicts with `masterUserPasswordWo`. */ masterUserPassword?: pulumi.Input; /** * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. * Password for the master user. Not stored in the Terraform state. Requires `masterUserPasswordWoVersion`. */ masterUserPasswordWo?: pulumi.Input; /** * Version of `masterUserPasswordWo`. Change it to update the password. */ masterUserPasswordWoVersion?: pulumi.Input; /** * ARN, ID, or alias of the AWS KMS key used to encrypt the Secrets Manager secret when `manageMasterUserPassword` is `true`. Can't be changed while `manageMasterUserPassword` is `true`; turn it off, apply, then turn it back on with the new key. After import, omit it or use the secret's key ARN. Defaults to the `aws/secretsmanager` key. */ masterUserSecretKmsKeyId?: pulumi.Input; /** * Secrets Manager secret for the master user password when `manageMasterUserPassword` is `true`. See `masterUserSecret` Block below. */ masterUserSecrets?: pulumi.Input[] | undefined>; /** * Name of the master user for the tenant database. */ masterUsername?: pulumi.Input; /** * National character set of the tenant database. Defaults to `AL16UTF16`. */ ncharCharacterSetName?: 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; /** * Whether to skip the final DB snapshot when the tenant database is deleted. Defaults to `false`. */ skipFinalSnapshot?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * * > **Note:** One of `manageMasterUserPassword`, `masterUserPassword`, or `masterUserPasswordWo` is required by RDS when creating a tenant database. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Region-unique, immutable identifier of the tenant database. */ tenantDatabaseResourceId?: pulumi.Input; /** * Name of the tenant database. Changing it renames the tenant database. * * The following arguments are optional: */ tenantDbName?: pulumi.Input; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a TenantDatabase resource. */ export interface TenantDatabaseArgs { /** * Character set of the tenant database. Defaults to `AL32UTF8`. */ characterSetName?: pulumi.Input; /** * Identifier of the DB instance that contains the tenant database. */ dbInstanceIdentifier: pulumi.Input; /** * Name of the DB snapshot created when the tenant database is deleted. Required unless `skipFinalSnapshot` is `true`. */ finalSnapshotIdentifier?: pulumi.Input; /** * Whether to manage the master user password with AWS Secrets Manager. When `true`, conflicts with `masterUserPassword` and `masterUserPasswordWo`. Turning it off requires one of them. */ manageMasterUserPassword?: pulumi.Input; /** * Password for the master user. Stored in the Terraform state. Conflicts with `masterUserPasswordWo`. */ masterUserPassword?: pulumi.Input; /** * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. * Password for the master user. Not stored in the Terraform state. Requires `masterUserPasswordWoVersion`. */ masterUserPasswordWo?: pulumi.Input; /** * Version of `masterUserPasswordWo`. Change it to update the password. */ masterUserPasswordWoVersion?: pulumi.Input; /** * ARN, ID, or alias of the AWS KMS key used to encrypt the Secrets Manager secret when `manageMasterUserPassword` is `true`. Can't be changed while `manageMasterUserPassword` is `true`; turn it off, apply, then turn it back on with the new key. After import, omit it or use the secret's key ARN. Defaults to the `aws/secretsmanager` key. */ masterUserSecretKmsKeyId?: pulumi.Input; /** * Name of the master user for the tenant database. */ masterUsername: pulumi.Input; /** * National character set of the tenant database. Defaults to `AL16UTF16`. */ ncharCharacterSetName?: 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; /** * Whether to skip the final DB snapshot when the tenant database is deleted. Defaults to `false`. */ skipFinalSnapshot?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * * > **Note:** One of `manageMasterUserPassword`, `masterUserPassword`, or `masterUserPasswordWo` is required by RDS when creating a tenant database. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Name of the tenant database. Changing it renames the tenant database. * * The following arguments are optional: */ tenantDbName: pulumi.Input; timeouts?: pulumi.Input; } //# sourceMappingURL=tenantDatabase.d.ts.map