import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as enums from "../types/enums"; /** * Manages a [RDS Aurora Cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_Aurora.html) or a [RDS Multi-AZ DB Cluster](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html). To manage cluster instances that inherit configuration from the cluster (when not running the cluster in `serverless` engine mode), see the `aws.rds.ClusterInstance` resource. To manage non-Aurora DB instances (e.g., MySQL, PostgreSQL, SQL Server, etc.), see the `aws.rds.Instance` resource. * * For information on the difference between the available Aurora MySQL engines see [Comparison between Aurora MySQL 1 and Aurora MySQL 2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Updates.20180206.html) in the Amazon RDS User Guide. * * Changes to an RDS Cluster can occur when you manually change a parameter, such as `port`, and are reflected in the next maintenance window. Because of this, this provider may report a difference in its planning phase because a modification has not yet taken place. You can use the `applyImmediately` flag to instruct the service to apply the change immediately (see documentation below). * * > **Note:** Multi-AZ DB clusters are supported only for the MySQL and PostgreSQL DB engines. * * > **Note:** `caCertificateIdentifier` is only supported for Multi-AZ DB clusters. * * > **Note:** using `applyImmediately` can result in a brief downtime as the server reboots. See the AWS Docs on [RDS Maintenance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html) for more information. * * > **Note:** All arguments including the username and password will be stored in the raw state as plain-text. * **NOTE on RDS Clusters and RDS Cluster Role Associations:** Pulumi provides both a standalone RDS Cluster Role Association - (an association between an RDS Cluster and a single IAM Role) and an RDS Cluster resource with `iamRoles` attributes. Use one resource or the other to associate IAM Roles and RDS Clusters. Not doing so will cause a conflict of associations and will result in the association being overwritten. * * ## Example Usage * * ### Aurora MySQL 2.x (MySQL 5.7) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.rds.Cluster("default", { * clusterIdentifier: "aurora-cluster-demo", * engine: aws.rds.EngineType.AuroraMysql, * engineVersion: "5.7.mysql_aurora.2.03.2", * availabilityZones: [ * "us-west-2a", * "us-west-2b", * "us-west-2c", * ], * databaseName: "mydb", * masterUsername: "foo", * masterPassword: "must_be_eight_characters", * backupRetentionPeriod: 5, * preferredBackupWindow: "07:00-09:00", * }); * ``` * * ### Aurora MySQL 1.x (MySQL 5.6) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.rds.Cluster("default", { * clusterIdentifier: "aurora-cluster-demo", * availabilityZones: [ * "us-west-2a", * "us-west-2b", * "us-west-2c", * ], * databaseName: "mydb", * masterUsername: "foo", * masterPassword: "must_be_eight_characters", * backupRetentionPeriod: 5, * preferredBackupWindow: "07:00-09:00", * }); * ``` * * ### Aurora with PostgreSQL engine * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const postgresql = new aws.rds.Cluster("postgresql", { * clusterIdentifier: "aurora-cluster-demo", * engine: aws.rds.EngineType.AuroraPostgresql, * availabilityZones: [ * "us-west-2a", * "us-west-2b", * "us-west-2c", * ], * databaseName: "mydb", * masterUsername: "foo", * masterPassword: "must_be_eight_characters", * backupRetentionPeriod: 5, * preferredBackupWindow: "07:00-09:00", * }); * ``` * * ### RDS Multi-AZ Cluster * * > More information about RDS Multi-AZ Clusters can be found in the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html). * * To create a Multi-AZ RDS cluster, you must additionally specify the `engine`, `storageType`, `allocatedStorage`, `iops` and `dbClusterInstanceClass` attributes. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Cluster("example", { * clusterIdentifier: "example", * availabilityZones: [ * "us-west-2a", * "us-west-2b", * "us-west-2c", * ], * engine: aws.rds.EngineType.Mysql, * dbClusterInstanceClass: "db.r6gd.xlarge", * storageType: "io1", * allocatedStorage: 100, * iops: 1000, * masterUsername: "test", * masterPassword: "mustbeeightcharaters", * }); * ``` * * ### RDS Serverless v2 Cluster * * > More information about RDS Serverless v2 Clusters can be found in the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html). * * > **Note:** Unlike Serverless v1, in Serverless v2 the `storageEncrypted` value is set to `false` by default. * This is because Serverless v1 uses the `serverless` `engineMode`, but Serverless v2 uses the `provisioned` `engineMode`. * * To create a Serverless v2 RDS cluster, you must additionally specify the `engineMode` and `serverlessv2ScalingConfiguration` attributes. An `aws.rds.ClusterInstance` resource must also be added to the cluster with the `instanceClass` attribute specified. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Cluster("example", { * serverlessv2ScalingConfiguration: { * maxCapacity: 1, * minCapacity: 0, * secondsUntilAutoPause: 3600, * }, * clusterIdentifier: "example", * engine: aws.rds.EngineType.AuroraPostgresql, * engineMode: aws.rds.EngineMode.Provisioned, * engineVersion: "13.6", * databaseName: "test", * masterUsername: "test", * masterPassword: "must_be_eight_characters", * storageEncrypted: true, * }); * const exampleClusterInstance = new aws.rds.ClusterInstance("example", { * clusterIdentifier: example.id, * instanceClass: "db.serverless", * engine: example.engine.apply((x) => aws.rds.EngineType[x]), * engineVersion: example.engineVersion, * }); * ``` * * ### RDS/Aurora Managed Master Passwords via Secrets Manager, default KMS Key * * > More information about RDS/Aurora Aurora integrates with Secrets Manager to manage master user passwords for your DB clusters can be found in the [RDS User Guide](https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-rds-integration-aws-secrets-manager/) and [Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html). * * You can specify the `manageMasterUserPassword` attribute to enable managing the master password with Secrets Manager. You can also update an existing cluster to use Secrets Manager by specify the `manageMasterUserPassword` attribute and removing the `masterPassword` attribute (removal is required). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.rds.Cluster("test", { * clusterIdentifier: "example", * databaseName: "test", * manageMasterUserPassword: true, * masterUsername: "test", * }); * ``` * * ### RDS/Aurora Managed Master Passwords via Secrets Manager, specific KMS Key * * > More information about RDS/Aurora Aurora integrates with Secrets Manager to manage master user passwords for your DB clusters can be found in the [RDS User Guide](https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-rds-integration-aws-secrets-manager/) and [Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html). * * You can specify the `masterUserSecretKmsKeyId` attribute to specify a specific KMS Key. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.kms.Key("example", {description: "Example KMS Key"}); * const test = new aws.rds.Cluster("test", { * clusterIdentifier: "example", * databaseName: "test", * manageMasterUserPassword: true, * masterUsername: "test", * masterUserSecretKmsKeyId: example.keyId, * }); * ``` * * ### Disabling Master Password Rotation * * > **Note:** The `aws.secretsmanager.SecretRotation` resource must depend on a cluster instance, otherwise AWS re-enables rotation once the instance finishes provisioning. Use `dependsOn` as shown below when the cluster and its instance are created together. * * When `manageMasterUserPassword` is enabled, Secrets Manager rotates the master user password automatically (every 7 days by default). To disable that rotation while keeping the managed secret, manage the secret's rotation with `aws.secretsmanager.SecretRotation` and set `rotationEnabled = false`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.rds.Cluster("test", { * clusterIdentifier: "example", * databaseName: "test", * manageMasterUserPassword: true, * masterUsername: "test", * }); * const testClusterInstance = new aws.rds.ClusterInstance("test", { * clusterIdentifier: test.id, * identifier: "example-1", * instanceClass: aws.rds.InstanceType.R6G_Large, * engine: test.engine.apply((x) => aws.rds.EngineType[x]), * engineVersion: test.engineVersion, * }); * const testSecretRotation = new aws.secretsmanager.SecretRotation("test", { * secretId: test.masterUserSecrets[0].secretArn, * rotationEnabled: false, * }, { * dependsOn: [testClusterInstance], * }); * ``` * * ### Global Cluster Restored From Snapshot * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.rds.getClusterSnapshot({ * dbClusterIdentifier: "example-original-cluster", * mostRecent: true, * }); * const exampleCluster = new aws.rds.Cluster("example", { * engine: aws.rds.EngineType.Aurora, * engineVersion: "5.6.mysql_aurora.1.22.4", * clusterIdentifier: "example", * snapshotIdentifier: example.then(example => example.id), * }, { * ignoreChanges: [ * "snapshotIdentifier", * "globalClusterIdentifier", * ], * }); * const exampleGlobalCluster = new aws.rds.GlobalCluster("example", { * globalClusterIdentifier: "example", * sourceDbClusterIdentifier: exampleCluster.arn, * forceDestroy: true, * }); * ``` * * ### Restore From S3 * * Full details on the core parameters and impacts are in the API Docs: [RestoreDBClusterFromS3](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBClusterFromS3.html). Requires that the S3 bucket be in the same region as the RDS cluster you're trying to create. * * > **NOTE:** RDS Aurora Serverless does not support loading data from S3, so its not possible to directly use `engineMode` set to `serverless` with `s3Import`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const db = new aws.rds.Cluster("db", { * s3Import: { * sourceEngine: "mysql", * sourceEngineVersion: "5.6", * bucketName: "mybucket", * bucketPrefix: "backups", * ingestionRole: "arn:aws:iam::1234567890:role/role-xtrabackup-rds-restore", * }, * engine: aws.rds.EngineType.Aurora, * }); * ``` * * ### Restore To Point In Time * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example_clone = new aws.rds.Cluster("example-clone", {restoreToPointInTime: { * sourceClusterIdentifier: "example", * restoreType: "copy-on-write", * useLatestRestorableTime: true, * }}); * ``` * * ### Serverless v1 Scaling Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Cluster("example", { * scalingConfiguration: { * autoPause: true, * maxCapacity: 256, * minCapacity: 2, * secondsBeforeTimeout: 360, * secondsUntilAutoPause: 300, * timeoutAction: "ForceApplyCapacityChange", * }, * engineMode: aws.rds.EngineMode.Serverless, * }); * ``` * * ### Serverless v2 Scaling Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Cluster("example", {serverlessv2ScalingConfiguration: { * maxCapacity: 256, * minCapacity: 0, * secondsUntilAutoPause: 3600, * }}); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `clusterIdentifier` (String) Cluster identifier of the RDS Cluster. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import RDS Clusters using the `clusterIdentifier`. For example: * * ```sh * $ pulumi import aws:rds/cluster:Cluster aurora_cluster aurora-prod-cluster * ``` */ export declare class Cluster extends pulumi.CustomResource { /** * Get an existing Cluster 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?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster; /** * Returns true if the given object is an instance of Cluster. 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 Cluster; /** * Amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster. */ readonly allocatedStorage: pulumi.Output; /** * Enable to allow major engine version upgrades when changing engine versions. Defaults to `false`. */ readonly allowMajorVersionUpgrade: pulumi.Output; /** * Whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`. See [Amazon RDS Documentation for more information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) */ readonly applyImmediately: pulumi.Output; /** * ARN of cluster */ readonly arn: pulumi.Output; /** * Whether to apply minor engine upgrades automatically to the DB cluster during the maintenance window. Defaults to `true`. */ readonly autoMinorVersionUpgrade: pulumi.Output; /** * List of EC2 Availability Zones for the DB cluster storage where DB cluster instances can be created. RDS automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next pulumi up. We recommend specifying 3 AZs or using the `lifecycle` configuration block `ignoreChanges` argument if necessary. A maximum of 3 AZs can be configured. **Note:** [Multi-AZ DB clusters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) require exactly 3 Availability Zones in the DB subnet group. Aurora DB clusters can operate with fewer AZs, but RDS will still automatically assign 3 AZs as described above. */ readonly availabilityZones: pulumi.Output; /** * Target backtrack window, in seconds. Only available for `aurora` and `aurora-mysql` engines currently. To disable backtracking, set this value to `0`. Defaults to `0`. Must be between `0` and `259200` (72 hours) */ readonly backtrackWindow: pulumi.Output; /** * Days to retain backups for. Default `1` */ readonly backupRetentionPeriod: pulumi.Output; /** * CA certificate identifier to use for the DB cluster's server certificate. */ readonly caCertificateIdentifier: pulumi.Output; /** * Expiration date of the DB instance’s server certificate */ readonly caCertificateValidTill: pulumi.Output; /** * Cluster identifier. If omitted, this provider will assign a random, unique identifier. */ readonly clusterIdentifier: pulumi.Output; /** * Creates a unique cluster identifier beginning with the specified prefix. Conflicts with `clusterIdentifier`. */ readonly clusterIdentifierPrefix: pulumi.Output; /** * List of RDS Instances that are a part of this cluster */ readonly clusterMembers: pulumi.Output; /** * RDS Cluster Resource ID */ readonly clusterResourceId: pulumi.Output; /** * Scalability mode of the Aurora DB cluster. When set to `limitless`, the cluster operates as an Aurora Limitless Database. When set to `standard` (the default), the cluster uses normal DB instance creation. Valid values: `limitless`, `standard`. */ readonly clusterScalabilityType: pulumi.Output; /** * Copy all Cluster `tags` to snapshots. Default is `false`. */ readonly copyTagsToSnapshot: pulumi.Output; /** * Mode of Database Insights to enable for the DB cluster. Valid values: `standard`, `advanced`. */ readonly databaseInsightsMode: pulumi.Output; /** * Name for an automatically created database on cluster creation. There are different naming restrictions per database engine: [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints) */ readonly databaseName: pulumi.Output; /** * Compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example `db.m6g.xlarge`. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes and availability for your engine, see [DB instance class](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) in the Amazon RDS User Guide. */ readonly dbClusterInstanceClass: pulumi.Output; /** * Cluster parameter group to associate with the cluster. */ readonly dbClusterParameterGroupName: pulumi.Output; /** * Instance parameter group to associate with all instances of the DB cluster. The `dbInstanceParameterGroupName` parameter is only valid in combination with the `allowMajorVersionUpgrade` parameter. */ readonly dbInstanceParameterGroupName: pulumi.Output; /** * DB subnet group to associate with this DB cluster. **NOTE:** This must match the `dbSubnetGroupName` specified on every `aws.rds.ClusterInstance` in the cluster. */ readonly dbSubnetGroupName: pulumi.Output; /** * For use with RDS Custom. */ readonly dbSystemId: pulumi.Output; /** * Whether to remove automated backups immediately after the DB cluster is deleted. Default is `true`. */ readonly deleteAutomatedBackups: pulumi.Output; /** * If the DB cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. */ readonly deletionProtection: pulumi.Output; /** * ID of the Directory Service Active Directory domain to create the cluster in. */ readonly domain: pulumi.Output; /** * Name of the IAM role to be used when making API calls to the Directory Service. */ readonly domainIamRoleName: pulumi.Output; /** * Whether cluster should forward writes to an associated global cluster. Applied to secondary clusters to enable them to forward writes to an `aws.rds.GlobalCluster`'s primary cluster. See the [User Guide for Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-write-forwarding.html) for more information. */ readonly enableGlobalWriteForwarding: pulumi.Output; /** * Enable HTTP endpoint (data API). Only valid for some combinations of `engineMode`, `engine` and `engineVersion` and only available in some regions. See the [Region and version availability](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.regions) section of the documentation. This option also does not work with any of these options specified: `snapshotIdentifier`, `replicationSourceIdentifier`, `s3Import`. */ readonly enableHttpEndpoint: pulumi.Output; /** * Whether read replicas can forward write operations to the writer DB instance in the DB cluster. By default, write operations aren't allowed on reader DB instances. See the [User Guide for Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-write-forwarding.html) for more information. **NOTE:** Local write forwarding requires Aurora MySQL version 3.04 or higher. */ readonly enableLocalWriteForwarding: pulumi.Output; /** * Set of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: `audit`, `error`, `general`, `iam-db-auth-error`, `instance`, `postgresql` (PostgreSQL), `slowquery`. */ readonly enabledCloudwatchLogsExports: pulumi.Output; /** * DNS address of the RDS instance */ readonly endpoint: pulumi.Output; /** * Name of the database engine to be used for this DB cluster. Valid Values: `aurora-mysql`, `aurora-postgresql`, `mysql`, `postgres`. (Note that `mysql` and `postgres` are Multi-AZ RDS clusters). */ readonly engine: pulumi.Output; /** * Life cycle type for this DB instance. This setting is valid for cluster types Aurora DB clusters and Multi-AZ DB clusters. Valid values are `open-source-rds-extended-support`, `open-source-rds-extended-support-disabled`. Default value is `open-source-rds-extended-support`. [Using Amazon RDS Extended Support]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html */ readonly engineLifecycleSupport: pulumi.Output; /** * Database engine mode. Valid values: `global` (only valid for Aurora MySQL 1.21 and earlier), `parallelquery`, `provisioned`, `serverless`. Defaults to: `provisioned`. Specify an empty value (`""`) for no engine mode. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) for limitations when using `serverless`. */ readonly engineMode: pulumi.Output; /** * Database engine version. Updating this argument results in an outage. See the [Aurora MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html) and [Aurora Postgres](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.html) documentation for your configured engine to determine this value, or by running `aws rds describe-db-engine-versions`. For example with Aurora MySQL 2, a potential value for this argument is `5.7.mysql_aurora.2.03.2`. The value can contain a partial version where supported by the API. The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. */ readonly engineVersion: pulumi.Output; /** * Running version of the database. */ readonly engineVersionActual: pulumi.Output; /** * Name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. */ readonly finalSnapshotIdentifier: pulumi.Output; /** * Global cluster identifier specified on `aws.rds.GlobalCluster`. */ readonly globalClusterIdentifier: pulumi.Output; /** * Route53 Hosted Zone ID of the endpoint */ readonly hostedZoneId: pulumi.Output; /** * Whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. Please see [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) for availability and limitations. */ readonly iamDatabaseAuthenticationEnabled: pulumi.Output; /** * List of ARNs for the IAM roles to associate to the RDS Cluster. */ readonly iamRoles: pulumi.Output; /** * Amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster. For information about valid Iops values, see [Amazon RDS Provisioned IOPS storage to improve performance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) in the Amazon RDS User Guide. (This setting is required to create a Multi-AZ DB cluster). Must be a multiple between .5 and 50 of the storage amount for the DB cluster. */ readonly iops: pulumi.Output; /** * ARN for the KMS encryption key. When specifying `kmsKeyId`, `storageEncrypted` needs to be set to true. */ readonly kmsKeyId: pulumi.Output; /** * Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if `masterPassword` is provided. */ readonly manageMasterUserPassword: pulumi.Output; /** * Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). Cannot be set if `manageMasterUserPassword` is set to `true`. */ readonly masterPassword: 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 DB user. Note that this may show up in logs. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). Cannot be set if `manageMasterUserPassword` is set to `true`. If set, requires `masterPasswordWoVersion` to be set. */ readonly masterPasswordWo: pulumi.Output; /** * Required when `masterPasswordWo` is set. Changing this value triggers an update to `masterPasswordWo`. */ readonly masterPasswordWoVersion: pulumi.Output; /** * Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. */ readonly masterUserSecretKmsKeyId: pulumi.Output; /** * Block that specifies the master user secret. Only available when `manageMasterUserPassword` is set to true. Documented below. */ readonly masterUserSecrets: pulumi.Output; /** * Username for the master DB user. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). This argument does not support in-place updates and cannot be changed during a restore from snapshot. */ readonly masterUsername: pulumi.Output; /** * Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. */ readonly monitoringInterval: pulumi.Output; /** * ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. You can find more information on the [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole.html) what IAM permissions are needed to allow Enhanced Monitoring for RDS Clusters. */ readonly monitoringRoleArn: pulumi.Output; /** * Network type of the cluster. Valid values: `IPV4`, `DUAL`. */ readonly networkType: pulumi.Output; /** * Enables Performance Insights. */ readonly performanceInsightsEnabled: pulumi.Output; /** * KMS Key ID to encrypt Performance Insights data. If not specified, the default RDS KMS key will be used (`aws/rds`). */ readonly performanceInsightsKmsKeyId: pulumi.Output; /** * Amount of time to retain performance insights data for. Defaults to 7 days if Performance Insights are enabled. Valid values are `7`, `month * 31` (where month is a number of months from 1-23), and `731`. See [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.cost.html) for more information on retention periods. */ readonly performanceInsightsRetentionPeriod: pulumi.Output; /** * Port on which the DB accepts connections. */ readonly port: pulumi.Output; /** * Daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC. Default: A 30-minute window selected at random from an 8-hour block of time per region, e.g. `04:00-09:00`. */ readonly preferredBackupWindow: pulumi.Output; /** * Weekly time range during which system maintenance can occur, in (UTC) e.g., `wed:04:00-wed:04:30` */ readonly preferredMaintenanceWindow: pulumi.Output; /** * Read-only endpoint for the Aurora cluster, automatically load-balanced across replicas */ readonly readerEndpoint: 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; /** * ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica. **Note:** Removing this attribute after creation will promote the read replica to a standalone cluster. If DB Cluster is part of a Global Cluster, use the `ignoreChanges` resource option to prevent Pulumi from showing differences for this argument instead of configuring this value. */ readonly replicationSourceIdentifier: pulumi.Output; /** * Nested attribute for [point in time restore](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-pitr.html). More details below. */ readonly restoreToPointInTime: pulumi.Output; readonly s3Import: pulumi.Output; /** * Nested attribute with scaling properties. Only valid when `engineMode` is set to `serverless`. More details below. */ readonly scalingConfiguration: pulumi.Output; /** * Nested attribute with scaling properties for ServerlessV2. Only valid when `engineMode` is set to `provisioned`. More details below. */ readonly serverlessv2ScalingConfiguration: pulumi.Output; /** * Whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from `finalSnapshotIdentifier`. Default is `false`. */ readonly skipFinalSnapshot: pulumi.Output; /** * Whether to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Conflicts with `globalClusterIdentifier`. Clusters cannot be restored from snapshot **and** joined to an existing global cluster in a single operation. See the [AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-getting-started.html#aurora-global-database.use-snapshot) or the Global Cluster Restored From Snapshot example for instructions on building a global cluster starting with a snapshot. */ readonly snapshotIdentifier: pulumi.Output; /** * Source region for an encrypted replica DB cluster. */ readonly sourceRegion: pulumi.Output; /** * Whether the DB cluster is encrypted. The default is `false` for `provisioned` `engineMode` and `true` for `serverless` `engineMode`. When restoring an unencrypted `snapshotIdentifier`, the `kmsKeyId` argument must be provided to encrypt the restored cluster. The provider will only perform drift detection if a configuration value is provided. */ readonly storageEncrypted: pulumi.Output; /** * (Forces new for Multi-AZ DB clusters) Specifies the storage type to be associated with the DB cluster. For Aurora DB clusters, `storageType` modifications can be done in-place. For Multi-AZ DB Clusters, the `iops` argument must also be set. Valid values are: `""`, `aurora-iopt1` (Aurora DB Clusters); `io1`, `io2`, `gp3` (Multi-AZ DB Clusters). Default: `""` (Aurora DB Clusters); `io1` (Multi-AZ DB Clusters). */ readonly storageType: pulumi.Output; /** * Map of tags to assign to the DB cluster. 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>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Order in which the clusters are upgraded (`first`, `second`, `last`). See [the AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Maintenance.AMVU.UpgradeRollout.html) for details. */ readonly upgradeRolloutOrder: pulumi.Output; /** * List of VPC security groups to associate with the Cluster */ readonly vpcSecurityGroupIds: pulumi.Output; /** * Set of RDS event categories (for example `failure`, `maintenance`) to check for after create and update operations. If set, the provider describes RDS events reported for this cluster during the operation and surfaces a warning diagnostic, with the RDS event message, for each one found in these categories. Has no effect if unset; see [DescribeEvents](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEvents.html) and the `aws.rds.getEvents` data source for the source of these events. Requires the `rds:DescribeEvents` IAM permission when set. */ readonly warningEventCategories: pulumi.Output; /** * Create a Cluster 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: ClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Cluster resources. */ export interface ClusterState { /** * Amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster. */ allocatedStorage?: pulumi.Input; /** * Enable to allow major engine version upgrades when changing engine versions. Defaults to `false`. */ allowMajorVersionUpgrade?: pulumi.Input; /** * Whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`. See [Amazon RDS Documentation for more information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) */ applyImmediately?: pulumi.Input; /** * ARN of cluster */ arn?: pulumi.Input; /** * Whether to apply minor engine upgrades automatically to the DB cluster during the maintenance window. Defaults to `true`. */ autoMinorVersionUpgrade?: pulumi.Input; /** * List of EC2 Availability Zones for the DB cluster storage where DB cluster instances can be created. RDS automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next pulumi up. We recommend specifying 3 AZs or using the `lifecycle` configuration block `ignoreChanges` argument if necessary. A maximum of 3 AZs can be configured. **Note:** [Multi-AZ DB clusters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) require exactly 3 Availability Zones in the DB subnet group. Aurora DB clusters can operate with fewer AZs, but RDS will still automatically assign 3 AZs as described above. */ availabilityZones?: pulumi.Input[] | undefined>; /** * Target backtrack window, in seconds. Only available for `aurora` and `aurora-mysql` engines currently. To disable backtracking, set this value to `0`. Defaults to `0`. Must be between `0` and `259200` (72 hours) */ backtrackWindow?: pulumi.Input; /** * Days to retain backups for. Default `1` */ backupRetentionPeriod?: pulumi.Input; /** * CA certificate identifier to use for the DB cluster's server certificate. */ caCertificateIdentifier?: pulumi.Input; /** * Expiration date of the DB instance’s server certificate */ caCertificateValidTill?: pulumi.Input; /** * Cluster identifier. If omitted, this provider will assign a random, unique identifier. */ clusterIdentifier?: pulumi.Input; /** * Creates a unique cluster identifier beginning with the specified prefix. Conflicts with `clusterIdentifier`. */ clusterIdentifierPrefix?: pulumi.Input; /** * List of RDS Instances that are a part of this cluster */ clusterMembers?: pulumi.Input[] | undefined>; /** * RDS Cluster Resource ID */ clusterResourceId?: pulumi.Input; /** * Scalability mode of the Aurora DB cluster. When set to `limitless`, the cluster operates as an Aurora Limitless Database. When set to `standard` (the default), the cluster uses normal DB instance creation. Valid values: `limitless`, `standard`. */ clusterScalabilityType?: pulumi.Input; /** * Copy all Cluster `tags` to snapshots. Default is `false`. */ copyTagsToSnapshot?: pulumi.Input; /** * Mode of Database Insights to enable for the DB cluster. Valid values: `standard`, `advanced`. */ databaseInsightsMode?: pulumi.Input; /** * Name for an automatically created database on cluster creation. There are different naming restrictions per database engine: [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints) */ databaseName?: pulumi.Input; /** * Compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example `db.m6g.xlarge`. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes and availability for your engine, see [DB instance class](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) in the Amazon RDS User Guide. */ dbClusterInstanceClass?: pulumi.Input; /** * Cluster parameter group to associate with the cluster. */ dbClusterParameterGroupName?: pulumi.Input; /** * Instance parameter group to associate with all instances of the DB cluster. The `dbInstanceParameterGroupName` parameter is only valid in combination with the `allowMajorVersionUpgrade` parameter. */ dbInstanceParameterGroupName?: pulumi.Input; /** * DB subnet group to associate with this DB cluster. **NOTE:** This must match the `dbSubnetGroupName` specified on every `aws.rds.ClusterInstance` in the cluster. */ dbSubnetGroupName?: pulumi.Input; /** * For use with RDS Custom. */ dbSystemId?: pulumi.Input; /** * Whether to remove automated backups immediately after the DB cluster is deleted. Default is `true`. */ deleteAutomatedBackups?: pulumi.Input; /** * If the DB cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. */ deletionProtection?: pulumi.Input; /** * ID of the Directory Service Active Directory domain to create the cluster in. */ domain?: pulumi.Input; /** * Name of the IAM role to be used when making API calls to the Directory Service. */ domainIamRoleName?: pulumi.Input; /** * Whether cluster should forward writes to an associated global cluster. Applied to secondary clusters to enable them to forward writes to an `aws.rds.GlobalCluster`'s primary cluster. See the [User Guide for Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-write-forwarding.html) for more information. */ enableGlobalWriteForwarding?: pulumi.Input; /** * Enable HTTP endpoint (data API). Only valid for some combinations of `engineMode`, `engine` and `engineVersion` and only available in some regions. See the [Region and version availability](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.regions) section of the documentation. This option also does not work with any of these options specified: `snapshotIdentifier`, `replicationSourceIdentifier`, `s3Import`. */ enableHttpEndpoint?: pulumi.Input; /** * Whether read replicas can forward write operations to the writer DB instance in the DB cluster. By default, write operations aren't allowed on reader DB instances. See the [User Guide for Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-write-forwarding.html) for more information. **NOTE:** Local write forwarding requires Aurora MySQL version 3.04 or higher. */ enableLocalWriteForwarding?: pulumi.Input; /** * Set of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: `audit`, `error`, `general`, `iam-db-auth-error`, `instance`, `postgresql` (PostgreSQL), `slowquery`. */ enabledCloudwatchLogsExports?: pulumi.Input[] | undefined>; /** * DNS address of the RDS instance */ endpoint?: pulumi.Input; /** * Name of the database engine to be used for this DB cluster. Valid Values: `aurora-mysql`, `aurora-postgresql`, `mysql`, `postgres`. (Note that `mysql` and `postgres` are Multi-AZ RDS clusters). */ engine?: pulumi.Input; /** * Life cycle type for this DB instance. This setting is valid for cluster types Aurora DB clusters and Multi-AZ DB clusters. Valid values are `open-source-rds-extended-support`, `open-source-rds-extended-support-disabled`. Default value is `open-source-rds-extended-support`. [Using Amazon RDS Extended Support]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html */ engineLifecycleSupport?: pulumi.Input; /** * Database engine mode. Valid values: `global` (only valid for Aurora MySQL 1.21 and earlier), `parallelquery`, `provisioned`, `serverless`. Defaults to: `provisioned`. Specify an empty value (`""`) for no engine mode. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) for limitations when using `serverless`. */ engineMode?: pulumi.Input; /** * Database engine version. Updating this argument results in an outage. See the [Aurora MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html) and [Aurora Postgres](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.html) documentation for your configured engine to determine this value, or by running `aws rds describe-db-engine-versions`. For example with Aurora MySQL 2, a potential value for this argument is `5.7.mysql_aurora.2.03.2`. The value can contain a partial version where supported by the API. The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. */ engineVersion?: pulumi.Input; /** * Running version of the database. */ engineVersionActual?: pulumi.Input; /** * Name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. */ finalSnapshotIdentifier?: pulumi.Input; /** * Global cluster identifier specified on `aws.rds.GlobalCluster`. */ globalClusterIdentifier?: pulumi.Input; /** * Route53 Hosted Zone ID of the endpoint */ hostedZoneId?: pulumi.Input; /** * Whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. Please see [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) for availability and limitations. */ iamDatabaseAuthenticationEnabled?: pulumi.Input; /** * List of ARNs for the IAM roles to associate to the RDS Cluster. */ iamRoles?: pulumi.Input[] | undefined>; /** * Amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster. For information about valid Iops values, see [Amazon RDS Provisioned IOPS storage to improve performance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) in the Amazon RDS User Guide. (This setting is required to create a Multi-AZ DB cluster). Must be a multiple between .5 and 50 of the storage amount for the DB cluster. */ iops?: pulumi.Input; /** * ARN for the KMS encryption key. When specifying `kmsKeyId`, `storageEncrypted` needs to be set to true. */ kmsKeyId?: pulumi.Input; /** * Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if `masterPassword` is provided. */ manageMasterUserPassword?: pulumi.Input; /** * Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). Cannot be set if `manageMasterUserPassword` is set to `true`. */ masterPassword?: 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 DB user. Note that this may show up in logs. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). Cannot be set if `manageMasterUserPassword` is set to `true`. If set, requires `masterPasswordWoVersion` to be set. */ masterPasswordWo?: pulumi.Input; /** * Required when `masterPasswordWo` is set. Changing this value triggers an update to `masterPasswordWo`. */ masterPasswordWoVersion?: pulumi.Input; /** * Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. */ masterUserSecretKmsKeyId?: pulumi.Input; /** * Block that specifies the master user secret. Only available when `manageMasterUserPassword` is set to true. Documented below. */ masterUserSecrets?: pulumi.Input[] | undefined>; /** * Username for the master DB user. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). This argument does not support in-place updates and cannot be changed during a restore from snapshot. */ masterUsername?: pulumi.Input; /** * Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. */ monitoringInterval?: pulumi.Input; /** * ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. You can find more information on the [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole.html) what IAM permissions are needed to allow Enhanced Monitoring for RDS Clusters. */ monitoringRoleArn?: pulumi.Input; /** * Network type of the cluster. Valid values: `IPV4`, `DUAL`. */ networkType?: pulumi.Input; /** * Enables Performance Insights. */ performanceInsightsEnabled?: pulumi.Input; /** * KMS Key ID to encrypt Performance Insights data. If not specified, the default RDS KMS key will be used (`aws/rds`). */ performanceInsightsKmsKeyId?: pulumi.Input; /** * Amount of time to retain performance insights data for. Defaults to 7 days if Performance Insights are enabled. Valid values are `7`, `month * 31` (where month is a number of months from 1-23), and `731`. See [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.cost.html) for more information on retention periods. */ performanceInsightsRetentionPeriod?: pulumi.Input; /** * Port on which the DB accepts connections. */ port?: pulumi.Input; /** * Daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC. Default: A 30-minute window selected at random from an 8-hour block of time per region, e.g. `04:00-09:00`. */ preferredBackupWindow?: pulumi.Input; /** * Weekly time range during which system maintenance can occur, in (UTC) e.g., `wed:04:00-wed:04:30` */ preferredMaintenanceWindow?: pulumi.Input; /** * Read-only endpoint for the Aurora cluster, automatically load-balanced across replicas */ readerEndpoint?: 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; /** * ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica. **Note:** Removing this attribute after creation will promote the read replica to a standalone cluster. If DB Cluster is part of a Global Cluster, use the `ignoreChanges` resource option to prevent Pulumi from showing differences for this argument instead of configuring this value. */ replicationSourceIdentifier?: pulumi.Input; /** * Nested attribute for [point in time restore](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-pitr.html). More details below. */ restoreToPointInTime?: pulumi.Input; s3Import?: pulumi.Input; /** * Nested attribute with scaling properties. Only valid when `engineMode` is set to `serverless`. More details below. */ scalingConfiguration?: pulumi.Input; /** * Nested attribute with scaling properties for ServerlessV2. Only valid when `engineMode` is set to `provisioned`. More details below. */ serverlessv2ScalingConfiguration?: pulumi.Input; /** * Whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from `finalSnapshotIdentifier`. Default is `false`. */ skipFinalSnapshot?: pulumi.Input; /** * Whether to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Conflicts with `globalClusterIdentifier`. Clusters cannot be restored from snapshot **and** joined to an existing global cluster in a single operation. See the [AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-getting-started.html#aurora-global-database.use-snapshot) or the Global Cluster Restored From Snapshot example for instructions on building a global cluster starting with a snapshot. */ snapshotIdentifier?: pulumi.Input; /** * Source region for an encrypted replica DB cluster. */ sourceRegion?: pulumi.Input; /** * Whether the DB cluster is encrypted. The default is `false` for `provisioned` `engineMode` and `true` for `serverless` `engineMode`. When restoring an unencrypted `snapshotIdentifier`, the `kmsKeyId` argument must be provided to encrypt the restored cluster. The provider will only perform drift detection if a configuration value is provided. */ storageEncrypted?: pulumi.Input; /** * (Forces new for Multi-AZ DB clusters) Specifies the storage type to be associated with the DB cluster. For Aurora DB clusters, `storageType` modifications can be done in-place. For Multi-AZ DB Clusters, the `iops` argument must also be set. Valid values are: `""`, `aurora-iopt1` (Aurora DB Clusters); `io1`, `io2`, `gp3` (Multi-AZ DB Clusters). Default: `""` (Aurora DB Clusters); `io1` (Multi-AZ DB Clusters). */ storageType?: pulumi.Input; /** * Map of tags to assign to the DB cluster. 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>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Order in which the clusters are upgraded (`first`, `second`, `last`). See [the AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Maintenance.AMVU.UpgradeRollout.html) for details. */ upgradeRolloutOrder?: pulumi.Input; /** * List of VPC security groups to associate with the Cluster */ vpcSecurityGroupIds?: pulumi.Input[] | undefined>; /** * Set of RDS event categories (for example `failure`, `maintenance`) to check for after create and update operations. If set, the provider describes RDS events reported for this cluster during the operation and surfaces a warning diagnostic, with the RDS event message, for each one found in these categories. Has no effect if unset; see [DescribeEvents](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEvents.html) and the `aws.rds.getEvents` data source for the source of these events. Requires the `rds:DescribeEvents` IAM permission when set. */ warningEventCategories?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a Cluster resource. */ export interface ClusterArgs { /** * Amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster. */ allocatedStorage?: pulumi.Input; /** * Enable to allow major engine version upgrades when changing engine versions. Defaults to `false`. */ allowMajorVersionUpgrade?: pulumi.Input; /** * Whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`. See [Amazon RDS Documentation for more information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) */ applyImmediately?: pulumi.Input; /** * Whether to apply minor engine upgrades automatically to the DB cluster during the maintenance window. Defaults to `true`. */ autoMinorVersionUpgrade?: pulumi.Input; /** * List of EC2 Availability Zones for the DB cluster storage where DB cluster instances can be created. RDS automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next pulumi up. We recommend specifying 3 AZs or using the `lifecycle` configuration block `ignoreChanges` argument if necessary. A maximum of 3 AZs can be configured. **Note:** [Multi-AZ DB clusters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) require exactly 3 Availability Zones in the DB subnet group. Aurora DB clusters can operate with fewer AZs, but RDS will still automatically assign 3 AZs as described above. */ availabilityZones?: pulumi.Input[] | undefined>; /** * Target backtrack window, in seconds. Only available for `aurora` and `aurora-mysql` engines currently. To disable backtracking, set this value to `0`. Defaults to `0`. Must be between `0` and `259200` (72 hours) */ backtrackWindow?: pulumi.Input; /** * Days to retain backups for. Default `1` */ backupRetentionPeriod?: pulumi.Input; /** * CA certificate identifier to use for the DB cluster's server certificate. */ caCertificateIdentifier?: pulumi.Input; /** * Cluster identifier. If omitted, this provider will assign a random, unique identifier. */ clusterIdentifier?: pulumi.Input; /** * Creates a unique cluster identifier beginning with the specified prefix. Conflicts with `clusterIdentifier`. */ clusterIdentifierPrefix?: pulumi.Input; /** * List of RDS Instances that are a part of this cluster */ clusterMembers?: pulumi.Input[] | undefined>; /** * Scalability mode of the Aurora DB cluster. When set to `limitless`, the cluster operates as an Aurora Limitless Database. When set to `standard` (the default), the cluster uses normal DB instance creation. Valid values: `limitless`, `standard`. */ clusterScalabilityType?: pulumi.Input; /** * Copy all Cluster `tags` to snapshots. Default is `false`. */ copyTagsToSnapshot?: pulumi.Input; /** * Mode of Database Insights to enable for the DB cluster. Valid values: `standard`, `advanced`. */ databaseInsightsMode?: pulumi.Input; /** * Name for an automatically created database on cluster creation. There are different naming restrictions per database engine: [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints) */ databaseName?: pulumi.Input; /** * Compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example `db.m6g.xlarge`. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes and availability for your engine, see [DB instance class](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) in the Amazon RDS User Guide. */ dbClusterInstanceClass?: pulumi.Input; /** * Cluster parameter group to associate with the cluster. */ dbClusterParameterGroupName?: pulumi.Input; /** * Instance parameter group to associate with all instances of the DB cluster. The `dbInstanceParameterGroupName` parameter is only valid in combination with the `allowMajorVersionUpgrade` parameter. */ dbInstanceParameterGroupName?: pulumi.Input; /** * DB subnet group to associate with this DB cluster. **NOTE:** This must match the `dbSubnetGroupName` specified on every `aws.rds.ClusterInstance` in the cluster. */ dbSubnetGroupName?: pulumi.Input; /** * For use with RDS Custom. */ dbSystemId?: pulumi.Input; /** * Whether to remove automated backups immediately after the DB cluster is deleted. Default is `true`. */ deleteAutomatedBackups?: pulumi.Input; /** * If the DB cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. */ deletionProtection?: pulumi.Input; /** * ID of the Directory Service Active Directory domain to create the cluster in. */ domain?: pulumi.Input; /** * Name of the IAM role to be used when making API calls to the Directory Service. */ domainIamRoleName?: pulumi.Input; /** * Whether cluster should forward writes to an associated global cluster. Applied to secondary clusters to enable them to forward writes to an `aws.rds.GlobalCluster`'s primary cluster. See the [User Guide for Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-write-forwarding.html) for more information. */ enableGlobalWriteForwarding?: pulumi.Input; /** * Enable HTTP endpoint (data API). Only valid for some combinations of `engineMode`, `engine` and `engineVersion` and only available in some regions. See the [Region and version availability](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.regions) section of the documentation. This option also does not work with any of these options specified: `snapshotIdentifier`, `replicationSourceIdentifier`, `s3Import`. */ enableHttpEndpoint?: pulumi.Input; /** * Whether read replicas can forward write operations to the writer DB instance in the DB cluster. By default, write operations aren't allowed on reader DB instances. See the [User Guide for Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-write-forwarding.html) for more information. **NOTE:** Local write forwarding requires Aurora MySQL version 3.04 or higher. */ enableLocalWriteForwarding?: pulumi.Input; /** * Set of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: `audit`, `error`, `general`, `iam-db-auth-error`, `instance`, `postgresql` (PostgreSQL), `slowquery`. */ enabledCloudwatchLogsExports?: pulumi.Input[] | undefined>; /** * Name of the database engine to be used for this DB cluster. Valid Values: `aurora-mysql`, `aurora-postgresql`, `mysql`, `postgres`. (Note that `mysql` and `postgres` are Multi-AZ RDS clusters). */ engine: pulumi.Input; /** * Life cycle type for this DB instance. This setting is valid for cluster types Aurora DB clusters and Multi-AZ DB clusters. Valid values are `open-source-rds-extended-support`, `open-source-rds-extended-support-disabled`. Default value is `open-source-rds-extended-support`. [Using Amazon RDS Extended Support]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html */ engineLifecycleSupport?: pulumi.Input; /** * Database engine mode. Valid values: `global` (only valid for Aurora MySQL 1.21 and earlier), `parallelquery`, `provisioned`, `serverless`. Defaults to: `provisioned`. Specify an empty value (`""`) for no engine mode. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) for limitations when using `serverless`. */ engineMode?: pulumi.Input; /** * Database engine version. Updating this argument results in an outage. See the [Aurora MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html) and [Aurora Postgres](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.html) documentation for your configured engine to determine this value, or by running `aws rds describe-db-engine-versions`. For example with Aurora MySQL 2, a potential value for this argument is `5.7.mysql_aurora.2.03.2`. The value can contain a partial version where supported by the API. The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. */ engineVersion?: pulumi.Input; /** * Name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. */ finalSnapshotIdentifier?: pulumi.Input; /** * Global cluster identifier specified on `aws.rds.GlobalCluster`. */ globalClusterIdentifier?: pulumi.Input; /** * Whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. Please see [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) for availability and limitations. */ iamDatabaseAuthenticationEnabled?: pulumi.Input; /** * List of ARNs for the IAM roles to associate to the RDS Cluster. */ iamRoles?: pulumi.Input[] | undefined>; /** * Amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster. For information about valid Iops values, see [Amazon RDS Provisioned IOPS storage to improve performance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) in the Amazon RDS User Guide. (This setting is required to create a Multi-AZ DB cluster). Must be a multiple between .5 and 50 of the storage amount for the DB cluster. */ iops?: pulumi.Input; /** * ARN for the KMS encryption key. When specifying `kmsKeyId`, `storageEncrypted` needs to be set to true. */ kmsKeyId?: pulumi.Input; /** * Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if `masterPassword` is provided. */ manageMasterUserPassword?: pulumi.Input; /** * Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). Cannot be set if `manageMasterUserPassword` is set to `true`. */ masterPassword?: 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 DB user. Note that this may show up in logs. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). Cannot be set if `manageMasterUserPassword` is set to `true`. If set, requires `masterPasswordWoVersion` to be set. */ masterPasswordWo?: pulumi.Input; /** * Required when `masterPasswordWo` is set. Changing this value triggers an update to `masterPasswordWo`. */ masterPasswordWoVersion?: pulumi.Input; /** * Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used. */ masterUserSecretKmsKeyId?: pulumi.Input; /** * Username for the master DB user. Please refer to the [RDS Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints). This argument does not support in-place updates and cannot be changed during a restore from snapshot. */ masterUsername?: pulumi.Input; /** * Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. */ monitoringInterval?: pulumi.Input; /** * ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. You can find more information on the [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole.html) what IAM permissions are needed to allow Enhanced Monitoring for RDS Clusters. */ monitoringRoleArn?: pulumi.Input; /** * Network type of the cluster. Valid values: `IPV4`, `DUAL`. */ networkType?: pulumi.Input; /** * Enables Performance Insights. */ performanceInsightsEnabled?: pulumi.Input; /** * KMS Key ID to encrypt Performance Insights data. If not specified, the default RDS KMS key will be used (`aws/rds`). */ performanceInsightsKmsKeyId?: pulumi.Input; /** * Amount of time to retain performance insights data for. Defaults to 7 days if Performance Insights are enabled. Valid values are `7`, `month * 31` (where month is a number of months from 1-23), and `731`. See [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.cost.html) for more information on retention periods. */ performanceInsightsRetentionPeriod?: pulumi.Input; /** * Port on which the DB accepts connections. */ port?: pulumi.Input; /** * Daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC. Default: A 30-minute window selected at random from an 8-hour block of time per region, e.g. `04:00-09:00`. */ preferredBackupWindow?: pulumi.Input; /** * Weekly time range during which system maintenance can occur, in (UTC) e.g., `wed:04:00-wed:04:30` */ preferredMaintenanceWindow?: 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; /** * ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica. **Note:** Removing this attribute after creation will promote the read replica to a standalone cluster. If DB Cluster is part of a Global Cluster, use the `ignoreChanges` resource option to prevent Pulumi from showing differences for this argument instead of configuring this value. */ replicationSourceIdentifier?: pulumi.Input; /** * Nested attribute for [point in time restore](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-pitr.html). More details below. */ restoreToPointInTime?: pulumi.Input; s3Import?: pulumi.Input; /** * Nested attribute with scaling properties. Only valid when `engineMode` is set to `serverless`. More details below. */ scalingConfiguration?: pulumi.Input; /** * Nested attribute with scaling properties for ServerlessV2. Only valid when `engineMode` is set to `provisioned`. More details below. */ serverlessv2ScalingConfiguration?: pulumi.Input; /** * Whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from `finalSnapshotIdentifier`. Default is `false`. */ skipFinalSnapshot?: pulumi.Input; /** * Whether to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Conflicts with `globalClusterIdentifier`. Clusters cannot be restored from snapshot **and** joined to an existing global cluster in a single operation. See the [AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-getting-started.html#aurora-global-database.use-snapshot) or the Global Cluster Restored From Snapshot example for instructions on building a global cluster starting with a snapshot. */ snapshotIdentifier?: pulumi.Input; /** * Source region for an encrypted replica DB cluster. */ sourceRegion?: pulumi.Input; /** * Whether the DB cluster is encrypted. The default is `false` for `provisioned` `engineMode` and `true` for `serverless` `engineMode`. When restoring an unencrypted `snapshotIdentifier`, the `kmsKeyId` argument must be provided to encrypt the restored cluster. The provider will only perform drift detection if a configuration value is provided. */ storageEncrypted?: pulumi.Input; /** * (Forces new for Multi-AZ DB clusters) Specifies the storage type to be associated with the DB cluster. For Aurora DB clusters, `storageType` modifications can be done in-place. For Multi-AZ DB Clusters, the `iops` argument must also be set. Valid values are: `""`, `aurora-iopt1` (Aurora DB Clusters); `io1`, `io2`, `gp3` (Multi-AZ DB Clusters). Default: `""` (Aurora DB Clusters); `io1` (Multi-AZ DB Clusters). */ storageType?: pulumi.Input; /** * Map of tags to assign to the DB cluster. 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>; /** * List of VPC security groups to associate with the Cluster */ vpcSecurityGroupIds?: pulumi.Input[] | undefined>; /** * Set of RDS event categories (for example `failure`, `maintenance`) to check for after create and update operations. If set, the provider describes RDS events reported for this cluster during the operation and surfaces a warning diagnostic, with the RDS event message, for each one found in these categories. Has no effect if unset; see [DescribeEvents](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEvents.html) and the `aws.rds.getEvents` data source for the source of these events. Requires the `rds:DescribeEvents` IAM permission when set. */ warningEventCategories?: pulumi.Input[] | undefined>; } //# sourceMappingURL=cluster.d.ts.map