import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a DocumentDB Cluster. * * Changes to a DocumentDB 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:** using `applyImmediately` can result in a brief downtime as the server reboots. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const docdb = new aws.docdb.Cluster("docdb", { * clusterIdentifier: "my-docdb-cluster", * engine: "docdb", * masterUsername: "foo", * masterPassword: "mustbeeightchars", * backupRetentionPeriod: 5, * preferredBackupWindow: "07:00-09:00", * skipFinalSnapshot: true, * }); * ``` * * ## Import * * Using `pulumi import`, import DocumentDB Clusters using the `clusterIdentifier`. For example: * * ```sh * $ pulumi import aws:docdb/cluster:Cluster docdb_cluster docdb-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; /** * A value that indicates whether major version upgrades are allowed. Constraints: You must allow major version upgrades when specifying a value for the EngineVersion parameter that is a different major version than the DB cluster's current version. */ readonly allowMajorVersionUpgrade: pulumi.Output; /** * Specifies whether any cluster modifications * are applied immediately, or during the next maintenance window. Default is * `false`. */ readonly applyImmediately: pulumi.Output; /** * ARN of cluster */ readonly arn: pulumi.Output; /** * A list of EC2 Availability Zones that instances in the DB cluster can be created in. * DocumentDB 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. */ readonly availabilityZones: pulumi.Output; /** * The days to retain backups for. Default `1` */ readonly backupRetentionPeriod: pulumi.Output; /** * The cluster identifier. If omitted, the 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 DocumentDB Instances that are a part of this cluster */ readonly clusterMembers: pulumi.Output; /** * The DocumentDB Cluster Resource ID */ readonly clusterResourceId: pulumi.Output; /** * A cluster parameter group to associate with the cluster. */ readonly dbClusterParameterGroupName: pulumi.Output; /** * A DB subnet group to associate with this DB instance. */ readonly dbSubnetGroupName: pulumi.Output; /** * A boolean value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. Defaults to `false`. */ readonly deletionProtection: pulumi.Output; /** * List of log types to export to cloudwatch. If omitted, no logs will be exported. * The following log types are supported: `audit`, `profiler`. */ readonly enabledCloudwatchLogsExports: pulumi.Output; /** * The DNS address of the DocumentDB instance */ readonly endpoint: pulumi.Output; /** * The name of the database engine to be used for this DB cluster. Defaults to `docdb`. Valid values: `docdb`. */ readonly engine: pulumi.Output; /** * The database engine version. Updating this argument results in an outage. */ readonly engineVersion: pulumi.Output; /** * The name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. */ readonly finalSnapshotIdentifier: pulumi.Output; /** * The global cluster identifier specified on `aws.docdb.GlobalCluster`. */ readonly globalClusterIdentifier: pulumi.Output; /** * The Route53 Hosted Zone ID of the endpoint */ readonly hostedZoneId: pulumi.Output; /** * The 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 Amazon DocumentDB to manage the master user password in AWS Secrets Manager. Cannot be set if `masterPassword` or `masterPasswordWo` 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 DocumentDB Naming Constraints. Conflicts with `masterPasswordWo` and `manageMasterUserPassword`. */ 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 will show up in logs. Please refer to the DocumentDB Naming Constraints. Conflicts with `masterPassword` and `manageMasterUserPassword`. 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; readonly masterUserSecrets: pulumi.Output; /** * Username for the master DB user. */ readonly masterUsername: pulumi.Output; /** * The network type of the DB cluster (`IPV4` or `DUAL`). */ readonly networkType: pulumi.Output; /** * The port on which the DB accepts connections */ readonly port: pulumi.Output; /** * The 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 regionE.g., 04:00-09:00 */ readonly preferredBackupWindow: pulumi.Output; /** * The weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30 */ readonly preferredMaintenanceWindow: pulumi.Output; /** * A read-only endpoint for the DocumentDB 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; /** * A configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details. */ readonly restoreToPointInTime: pulumi.Output; /** * Scaling configuration of an Amazon DocumentDB Serverless cluster. See Serverless V2 Scaling Configuration below for details. */ readonly serverlessV2ScalingConfiguration: pulumi.Output; /** * Determines 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; /** * Specifies whether or not 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. Automated snapshots **should not** be used for this attribute, unless from a different cluster. Automated snapshots are deleted as part of cluster destruction when the resource is replaced. */ readonly snapshotIdentifier: pulumi.Output; /** * Specifies whether the DB cluster is encrypted. The default is `false`. */ readonly storageEncrypted: pulumi.Output; /** * The storage type to associate with the DB cluster. Valid values: `standard`, `iopt1`. */ readonly storageType: pulumi.Output; /** * A 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>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * List of VPC security groups to associate * with the Cluster * * For more detailed documentation about each argument, refer to * the [AWS official documentation](https://docs.aws.amazon.com/cli/latest/reference/docdb/create-db-cluster.html). */ readonly vpcSecurityGroupIds: 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 { /** * A value that indicates whether major version upgrades are allowed. Constraints: You must allow major version upgrades when specifying a value for the EngineVersion parameter that is a different major version than the DB cluster's current version. */ allowMajorVersionUpgrade?: pulumi.Input; /** * Specifies whether any cluster modifications * are applied immediately, or during the next maintenance window. Default is * `false`. */ applyImmediately?: pulumi.Input; /** * ARN of cluster */ arn?: pulumi.Input; /** * A list of EC2 Availability Zones that instances in the DB cluster can be created in. * DocumentDB 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. */ availabilityZones?: pulumi.Input[] | undefined>; /** * The days to retain backups for. Default `1` */ backupRetentionPeriod?: pulumi.Input; /** * The cluster identifier. If omitted, the 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 DocumentDB Instances that are a part of this cluster */ clusterMembers?: pulumi.Input[] | undefined>; /** * The DocumentDB Cluster Resource ID */ clusterResourceId?: pulumi.Input; /** * A cluster parameter group to associate with the cluster. */ dbClusterParameterGroupName?: pulumi.Input; /** * A DB subnet group to associate with this DB instance. */ dbSubnetGroupName?: pulumi.Input; /** * A boolean value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. Defaults to `false`. */ deletionProtection?: pulumi.Input; /** * List of log types to export to cloudwatch. If omitted, no logs will be exported. * The following log types are supported: `audit`, `profiler`. */ enabledCloudwatchLogsExports?: pulumi.Input[] | undefined>; /** * The DNS address of the DocumentDB instance */ endpoint?: pulumi.Input; /** * The name of the database engine to be used for this DB cluster. Defaults to `docdb`. Valid values: `docdb`. */ engine?: pulumi.Input; /** * The database engine version. Updating this argument results in an outage. */ engineVersion?: pulumi.Input; /** * The name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. */ finalSnapshotIdentifier?: pulumi.Input; /** * The global cluster identifier specified on `aws.docdb.GlobalCluster`. */ globalClusterIdentifier?: pulumi.Input; /** * The Route53 Hosted Zone ID of the endpoint */ hostedZoneId?: pulumi.Input; /** * The ARN for the KMS encryption key. When specifying `kmsKeyId`, `storageEncrypted` needs to be set to true. */ kmsKeyId?: pulumi.Input; /** * Set to `true` to allow Amazon DocumentDB to manage the master user password in AWS Secrets Manager. Cannot be set if `masterPassword` or `masterPasswordWo` 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 DocumentDB Naming Constraints. Conflicts with `masterPasswordWo` and `manageMasterUserPassword`. */ 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 will show up in logs. Please refer to the DocumentDB Naming Constraints. Conflicts with `masterPassword` and `manageMasterUserPassword`. 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; masterUserSecrets?: pulumi.Input[] | undefined>; /** * Username for the master DB user. */ masterUsername?: pulumi.Input; /** * The network type of the DB cluster (`IPV4` or `DUAL`). */ networkType?: pulumi.Input; /** * The port on which the DB accepts connections */ port?: pulumi.Input; /** * The 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 regionE.g., 04:00-09:00 */ preferredBackupWindow?: pulumi.Input; /** * The weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30 */ preferredMaintenanceWindow?: pulumi.Input; /** * A read-only endpoint for the DocumentDB 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; /** * A configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details. */ restoreToPointInTime?: pulumi.Input; /** * Scaling configuration of an Amazon DocumentDB Serverless cluster. See Serverless V2 Scaling Configuration below for details. */ serverlessV2ScalingConfiguration?: pulumi.Input; /** * Determines 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; /** * Specifies whether or not 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. Automated snapshots **should not** be used for this attribute, unless from a different cluster. Automated snapshots are deleted as part of cluster destruction when the resource is replaced. */ snapshotIdentifier?: pulumi.Input; /** * Specifies whether the DB cluster is encrypted. The default is `false`. */ storageEncrypted?: pulumi.Input; /** * The storage type to associate with the DB cluster. Valid values: `standard`, `iopt1`. */ storageType?: pulumi.Input; /** * A 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>; /** * 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>; /** * List of VPC security groups to associate * with the Cluster * * For more detailed documentation about each argument, refer to * the [AWS official documentation](https://docs.aws.amazon.com/cli/latest/reference/docdb/create-db-cluster.html). */ vpcSecurityGroupIds?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a Cluster resource. */ export interface ClusterArgs { /** * A value that indicates whether major version upgrades are allowed. Constraints: You must allow major version upgrades when specifying a value for the EngineVersion parameter that is a different major version than the DB cluster's current version. */ allowMajorVersionUpgrade?: pulumi.Input; /** * Specifies whether any cluster modifications * are applied immediately, or during the next maintenance window. Default is * `false`. */ applyImmediately?: pulumi.Input; /** * A list of EC2 Availability Zones that instances in the DB cluster can be created in. * DocumentDB 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. */ availabilityZones?: pulumi.Input[] | undefined>; /** * The days to retain backups for. Default `1` */ backupRetentionPeriod?: pulumi.Input; /** * The cluster identifier. If omitted, the 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 DocumentDB Instances that are a part of this cluster */ clusterMembers?: pulumi.Input[] | undefined>; /** * A cluster parameter group to associate with the cluster. */ dbClusterParameterGroupName?: pulumi.Input; /** * A DB subnet group to associate with this DB instance. */ dbSubnetGroupName?: pulumi.Input; /** * A boolean value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. Defaults to `false`. */ deletionProtection?: pulumi.Input; /** * List of log types to export to cloudwatch. If omitted, no logs will be exported. * The following log types are supported: `audit`, `profiler`. */ enabledCloudwatchLogsExports?: pulumi.Input[] | undefined>; /** * The name of the database engine to be used for this DB cluster. Defaults to `docdb`. Valid values: `docdb`. */ engine?: pulumi.Input; /** * The database engine version. Updating this argument results in an outage. */ engineVersion?: pulumi.Input; /** * The name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made. */ finalSnapshotIdentifier?: pulumi.Input; /** * The global cluster identifier specified on `aws.docdb.GlobalCluster`. */ globalClusterIdentifier?: pulumi.Input; /** * The ARN for the KMS encryption key. When specifying `kmsKeyId`, `storageEncrypted` needs to be set to true. */ kmsKeyId?: pulumi.Input; /** * Set to `true` to allow Amazon DocumentDB to manage the master user password in AWS Secrets Manager. Cannot be set if `masterPassword` or `masterPasswordWo` 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 DocumentDB Naming Constraints. Conflicts with `masterPasswordWo` and `manageMasterUserPassword`. */ 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 will show up in logs. Please refer to the DocumentDB Naming Constraints. Conflicts with `masterPassword` and `manageMasterUserPassword`. 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; /** * Username for the master DB user. */ masterUsername?: pulumi.Input; /** * The network type of the DB cluster (`IPV4` or `DUAL`). */ networkType?: pulumi.Input; /** * The port on which the DB accepts connections */ port?: pulumi.Input; /** * The 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 regionE.g., 04:00-09:00 */ preferredBackupWindow?: pulumi.Input; /** * The 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; /** * A configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details. */ restoreToPointInTime?: pulumi.Input; /** * Scaling configuration of an Amazon DocumentDB Serverless cluster. See Serverless V2 Scaling Configuration below for details. */ serverlessV2ScalingConfiguration?: pulumi.Input; /** * Determines 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; /** * Specifies whether or not 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. Automated snapshots **should not** be used for this attribute, unless from a different cluster. Automated snapshots are deleted as part of cluster destruction when the resource is replaced. */ snapshotIdentifier?: pulumi.Input; /** * Specifies whether the DB cluster is encrypted. The default is `false`. */ storageEncrypted?: pulumi.Input; /** * The storage type to associate with the DB cluster. Valid values: `standard`, `iopt1`. */ storageType?: pulumi.Input; /** * A 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 * * For more detailed documentation about each argument, refer to * the [AWS official documentation](https://docs.aws.amazon.com/cli/latest/reference/docdb/create-db-cluster.html). */ vpcSecurityGroupIds?: pulumi.Input[] | undefined>; } //# sourceMappingURL=cluster.d.ts.map