Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.docdb.kotlin
import com.pulumi.aws.docdb.ClusterInstanceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides an DocumentDB Cluster Resource Instance. A Cluster Instance Resource defines
* attributes that are specific to a single instance in a [DocumentDB Cluster][1].
* You do not designate a primary and subsequent replicas. Instead, you simply add DocumentDB
* Instances and DocumentDB manages the replication. You can use the [count][3]
* meta-parameter to make multiple instances and join them all to the same DocumentDB
* Cluster, or you may specify different Cluster Instance resources with various
* `instance_class` sizes.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const _default = new aws.docdb.Cluster("default", {
* clusterIdentifier: "docdb-cluster-demo",
* availabilityZones: [
* "us-west-2a",
* "us-west-2b",
* "us-west-2c",
* ],
* masterUsername: "foo",
* masterPassword: "barbut8chars",
* });
* const clusterInstances: aws.docdb.ClusterInstance[] = [];
* for (const range = {value: 0}; range.value < 2; range.value++) {
* clusterInstances.push(new aws.docdb.ClusterInstance(`cluster_instances-${range.value}`, {
* identifier: `docdb-cluster-demo-${range.value}`,
* clusterIdentifier: _default.id,
* instanceClass: "db.r5.large",
* }));
* }
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* default = aws.docdb.Cluster("default",
* cluster_identifier="docdb-cluster-demo",
* availability_zones=[
* "us-west-2a",
* "us-west-2b",
* "us-west-2c",
* ],
* master_username="foo",
* master_password="barbut8chars")
* cluster_instances = []
* for range in [{"value": i} for i in range(0, 2)]:
* cluster_instances.append(aws.docdb.ClusterInstance(f"cluster_instances-{range['value']}",
* identifier=f"docdb-cluster-demo-{range['value']}",
* cluster_identifier=default.id,
* instance_class="db.r5.large"))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Aws.DocDB.Cluster("default", new()
* {
* ClusterIdentifier = "docdb-cluster-demo",
* AvailabilityZones = new[]
* {
* "us-west-2a",
* "us-west-2b",
* "us-west-2c",
* },
* MasterUsername = "foo",
* MasterPassword = "barbut8chars",
* });
* var clusterInstances = new List();
* for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
* {
* var range = new { Value = rangeIndex };
* clusterInstances.Add(new Aws.DocDB.ClusterInstance($"cluster_instances-{range.Value}", new()
* {
* Identifier = $"docdb-cluster-demo-{range.Value}",
* ClusterIdentifier = @default.Id,
* InstanceClass = "db.r5.large",
* }));
* }
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/docdb"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := docdb.NewCluster(ctx, "default", &docdb.ClusterArgs{
* ClusterIdentifier: pulumi.String("docdb-cluster-demo"),
* AvailabilityZones: pulumi.StringArray{
* pulumi.String("us-west-2a"),
* pulumi.String("us-west-2b"),
* pulumi.String("us-west-2c"),
* },
* MasterUsername: pulumi.String("foo"),
* MasterPassword: pulumi.String("barbut8chars"),
* })
* if err != nil {
* return err
* }
* var clusterInstances []*docdb.ClusterInstance
* for index := 0; index < 2; index++ {
* key0 := index
* val0 := index
* __res, err := docdb.NewClusterInstance(ctx, fmt.Sprintf("cluster_instances-%v", key0), &docdb.ClusterInstanceArgs{
* Identifier: pulumi.Sprintf("docdb-cluster-demo-%v", val0),
* ClusterIdentifier: _default.ID(),
* InstanceClass: pulumi.String("db.r5.large"),
* })
* if err != nil {
* return err
* }
* clusterInstances = append(clusterInstances, __res)
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.docdb.Cluster;
* import com.pulumi.aws.docdb.ClusterArgs;
* import com.pulumi.aws.docdb.ClusterInstance;
* import com.pulumi.aws.docdb.ClusterInstanceArgs;
* import com.pulumi.codegen.internal.KeyedValue;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var default_ = new Cluster("default", ClusterArgs.builder()
* .clusterIdentifier("docdb-cluster-demo")
* .availabilityZones(
* "us-west-2a",
* "us-west-2b",
* "us-west-2c")
* .masterUsername("foo")
* .masterPassword("barbut8chars")
* .build());
* for (var i = 0; i < 2; i++) {
* new ClusterInstance("clusterInstances-" + i, ClusterInstanceArgs.builder()
* .identifier(String.format("docdb-cluster-demo-%s", range.value()))
* .clusterIdentifier(default_.id())
* .instanceClass("db.r5.large")
* .build());
* }
* }
* }
* ```
* ```yaml
* resources:
* clusterInstances:
* type: aws:docdb:ClusterInstance
* name: cluster_instances
* properties:
* identifier: docdb-cluster-demo-${range.value}
* clusterIdentifier: ${default.id}
* instanceClass: db.r5.large
* options: {}
* default:
* type: aws:docdb:Cluster
* properties:
* clusterIdentifier: docdb-cluster-demo
* availabilityZones:
* - us-west-2a
* - us-west-2b
* - us-west-2c
* masterUsername: foo
* masterPassword: barbut8chars
* ```
*
* ## Import
* Using `pulumi import`, import DocumentDB Cluster Instances using the `identifier`. For example:
* ```sh
* $ pulumi import aws:docdb/clusterInstance:ClusterInstance prod_instance_1 aurora-cluster-instance-1
* ```
* @property applyImmediately Specifies whether any database modifications
* are applied immediately, or during the next maintenance window. Default is`false`.
* @property autoMinorVersionUpgrade This parameter does not apply to Amazon DocumentDB. Amazon DocumentDB does not perform minor version upgrades regardless of the value set (see [docs](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBInstance.html)). Default `true`.
* @property availabilityZone The EC2 Availability Zone that the DB instance is created in. See [docs](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_CreateDBInstance.html) about the details.
* @property caCertIdentifier The identifier of the certificate authority (CA) certificate for the DB instance.
* @property clusterIdentifier The identifier of the `aws.docdb.Cluster` in which to launch this instance.
* @property copyTagsToSnapshot Copy all DB instance `tags` to snapshots. Default is `false`.
* @property enablePerformanceInsights A value that indicates whether to enable Performance Insights for the DB Instance. Default `false`. See [docs] (https://docs.aws.amazon.com/documentdb/latest/developerguide/performance-insights.html) about the details.
* @property engine The name of the database engine to be used for the DocumentDB instance. Defaults to `docdb`. Valid Values: `docdb`.
* @property identifier The identifier for the DocumentDB instance, if omitted, the provider will assign a random, unique identifier.
* @property identifierPrefix Creates a unique identifier beginning with the specified prefix. Conflicts with `identifier`.
* @property instanceClass The instance class to use. For details on CPU and memory, see [Scaling for DocumentDB Instances](https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-manage-performance.html#db-cluster-manage-scaling-instance).
* DocumentDB currently supports the below instance classes.
* Please see [AWS Documentation](https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-classes.html#db-instance-class-specs) for complete details.
* - db.r6g.large
* - db.r6g.xlarge
* - db.r6g.2xlarge
* - db.r6g.4xlarge
* - db.r6g.8xlarge
* - db.r6g.12xlarge
* - db.r6g.16xlarge
* - db.r5.large
* - db.r5.xlarge
* - db.r5.2xlarge
* - db.r5.4xlarge
* - db.r5.12xlarge
* - db.r5.24xlarge
* - db.r4.large
* - db.r4.xlarge
* - db.r4.2xlarge
* - db.r4.4xlarge
* - db.r4.8xlarge
* - db.r4.16xlarge
* - db.t4g.medium
* - db.t3.medium
* @property performanceInsightsKmsKeyId The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. If you do not specify a value for PerformanceInsightsKMSKeyId, then Amazon DocumentDB uses your default KMS key.
* @property preferredMaintenanceWindow The window to perform maintenance in.
* Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00".
* @property promotionTier Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoter to writer.
* @property tags A map of tags to assign to the instance. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public data class ClusterInstanceArgs(
public val applyImmediately: Output? = null,
public val autoMinorVersionUpgrade: Output? = null,
public val availabilityZone: Output? = null,
public val caCertIdentifier: Output? = null,
public val clusterIdentifier: Output? = null,
public val copyTagsToSnapshot: Output? = null,
public val enablePerformanceInsights: Output? = null,
public val engine: Output? = null,
public val identifier: Output? = null,
public val identifierPrefix: Output? = null,
public val instanceClass: Output? = null,
public val performanceInsightsKmsKeyId: Output? = null,
public val preferredMaintenanceWindow: Output? = null,
public val promotionTier: Output? = null,
public val tags: Output