import * as core from "@terrascript/core"; export interface EndpointArgs extends core.SchemaArgs { address: string | core.StringOut; port: number | core.NumberOut; } export class Endpoint extends core.Schema { @core.attr(String, { computed: true }) public address!: string | core.StringOut; @core.attr(Number, { computed: true }) public port!: number | core.NumberOut; } export interface NodesArgs extends core.SchemaArgs { availabilityZone: string | core.StringOut; createTime: string | core.StringOut; endpoint: core.Array | core.ArrayOut; name: string | core.StringOut; } export class Nodes extends core.Schema { @core.attr(String, { computed: true }) public availabilityZone!: string | core.StringOut; @core.attr(String, { computed: true }) public createTime!: string | core.StringOut; @core.attr(Endpoint, { computed: true, kind: "array" }) public endpoint!: core.Array | core.ArrayOut; @core.attr(String, { computed: true }) public name!: string | core.StringOut; } export interface ShardsArgs extends core.SchemaArgs { name: string | core.StringOut; nodes: core.Array | core.ArrayOut; numNodes: number | core.NumberOut; slots: string | core.StringOut; } export class Shards extends core.Schema { @core.attr(String, { computed: true }) public name!: string | core.StringOut; @core.attr(Nodes, { computed: true, kind: "array" }) public nodes!: core.Array | core.ArrayOut; @core.attr(Number, { computed: true }) public numNodes!: number | core.NumberOut; @core.attr(String, { computed: true }) public slots!: string | core.StringOut; } export interface ClusterEndpointArgs extends core.SchemaArgs { address: string | core.StringOut; port: number | core.NumberOut; } export class ClusterEndpoint extends core.Schema { @core.attr(String, { computed: true }) public address!: string | core.StringOut; @core.attr(Number, { computed: true }) public port!: number | core.NumberOut; } export interface ClusterArgs extends core.ResourceArgs { /** * (Required) The name of the Access Control List to associate with the cluster. */ aclName: string | core.StringOut; /** * (Optional, Forces new resource) When set to `true`, the cluster will automatically receive minor eng * ine version upgrades after launch. Defaults to `true`. */ autoMinorVersionUpgrade?: boolean | core.BooleanOut; /** * (Optional) Description for the cluster. Defaults to `"Managed by Terraform"`. */ description?: string | core.StringOut; /** * (Optional) Version number of the Redis engine to be used for the cluster. Downgrades are not support * ed. */ engineVersion?: string | core.StringOut; /** * (Optional) Name of the final cluster snapshot to be created when this resource is deleted. If omitte * d, no final snapshot will be made. */ finalSnapshotName?: string | core.StringOut; /** * (Optional, Forces new resource) ARN of the KMS key used to encrypt the cluster at rest. */ kmsKeyArn?: string | core.StringOut; /** * (Optional) Specifies the weekly time range during which maintenance on the cluster is performed. Spe * cify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance win * dow is a 60 minute period. Example: `sun:23:00-mon:01:30`. */ maintenanceWindow?: string | core.StringOut; /** * (Optional, Forces new resource) Name of the cluster. If omitted, Terraform will assign a random, uni * que name. Conflicts with `name_prefix`. */ name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts * with `name`. */ namePrefix?: string | core.StringOut; /** * (Required) The compute and memory capacity of the nodes in the cluster. See AWS documentation on [su * pported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) * as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical- * scaling.html). */ nodeType: string | core.StringOut; /** * (Optional) The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e * . 2 nodes per shard). */ numReplicasPerShard?: number | core.NumberOut; /** * (Optional) The number of shards in the cluster. Defaults to `1`. */ numShards?: number | core.NumberOut; /** * (Optional) The name of the parameter group associated with the cluster. */ parameterGroupName?: string | core.StringOut; /** * (Optional, Forces new resource) The port number on which each of the nodes accepts connections. Defa * ults to `6379`. */ port?: number | core.NumberOut; /** * (Optional) Set of VPC Security Group ID-s to associate with this cluster. */ securityGroupIds?: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) List of ARN-s that uniquely identify RDB snapshot files stored in S3 * . The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot cont * ain any commas. */ snapshotArns?: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) The name of a snapshot from which to restore data into the new clust * er. */ snapshotName?: string | core.StringOut; /** * (Optional) The number of days for which MemoryDB retains automatic snapshots before deleting them. W * hen set to `0`, automatic backups are disabled. Defaults to `0`. */ snapshotRetentionLimit?: number | core.NumberOut; /** * (Optional) The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of you * r shard. Example: `05:00-09:00`. */ snapshotWindow?: string | core.StringOut; /** * (Optional) ARN of the SNS topic to which cluster notifications are sent. */ snsTopicArn?: string | core.StringOut; /** * (Optional, Forces new resource) The name of the subnet group to be used for the cluster. Defaults to * a subnet group consisting of default VPC subnets. */ subnetGroupName?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional, Forces new resource) A flag to enable in-transit encryption on the cluster. When set to ` * false`, the `acl_name` must be `open-access`. Defaults to `true`. */ tlsEnabled?: boolean | core.BooleanOut; } export class Cluster extends core.Resource { /** * (Required) The name of the Access Control List to associate with the cluster. */ @core.attr(String) public aclName!: string | core.StringOut; /** * The ARN of the cluster. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional, Forces new resource) When set to `true`, the cluster will automatically receive minor eng * ine version upgrades after launch. Defaults to `true`. */ @core.attr(Boolean) public autoMinorVersionUpgrade?: boolean | core.BooleanOut; @core.attr(ClusterEndpoint, { computed: true, kind: "array" }) public clusterEndpoint!: | core.Array | core.ArrayOut; /** * (Optional) Description for the cluster. Defaults to `"Managed by Terraform"`. */ @core.attr(String) public description?: string | core.StringOut; /** * Patch version number of the Redis engine used by the cluster. */ @core.attr(String, { computed: true }) public enginePatchVersion!: string | core.StringOut; /** * (Optional) Version number of the Redis engine to be used for the cluster. Downgrades are not support * ed. */ @core.attr(String, { computed: true }) public engineVersion?: string | core.StringOut; /** * (Optional) Name of the final cluster snapshot to be created when this resource is deleted. If omitte * d, no final snapshot will be made. */ @core.attr(String) public finalSnapshotName?: string | core.StringOut; /** * Same as `name`. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional, Forces new resource) ARN of the KMS key used to encrypt the cluster at rest. */ @core.attr(String) public kmsKeyArn?: string | core.StringOut; /** * (Optional) Specifies the weekly time range during which maintenance on the cluster is performed. Spe * cify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance win * dow is a 60 minute period. Example: `sun:23:00-mon:01:30`. */ @core.attr(String, { computed: true }) public maintenanceWindow?: string | core.StringOut; /** * (Optional, Forces new resource) Name of the cluster. If omitted, Terraform will assign a random, uni * que name. Conflicts with `name_prefix`. */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts * with `name`. */ @core.attr(String, { computed: true }) public namePrefix?: string | core.StringOut; /** * (Required) The compute and memory capacity of the nodes in the cluster. See AWS documentation on [su * pported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) * as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical- * scaling.html). */ @core.attr(String) public nodeType!: string | core.StringOut; /** * (Optional) The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e * . 2 nodes per shard). */ @core.attr(Number) public numReplicasPerShard?: number | core.NumberOut; /** * (Optional) The number of shards in the cluster. Defaults to `1`. */ @core.attr(Number) public numShards?: number | core.NumberOut; /** * (Optional) The name of the parameter group associated with the cluster. */ @core.attr(String, { computed: true }) public parameterGroupName?: string | core.StringOut; /** * (Optional, Forces new resource) The port number on which each of the nodes accepts connections. Defa * ults to `6379`. */ @core.attr(Number, { computed: true }) public port?: number | core.NumberOut; /** * (Optional) Set of VPC Security Group ID-s to associate with this cluster. */ @core.attr(String, { kind: "array" }) public securityGroupIds?: core.Array | core.ArrayOut; /** * Set of shards in this cluster. */ @core.attr(Shards, { computed: true, kind: "array" }) public shards!: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) List of ARN-s that uniquely identify RDB snapshot files stored in S3 * . The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot cont * ain any commas. */ @core.attr(String, { kind: "array" }) public snapshotArns?: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) The name of a snapshot from which to restore data into the new clust * er. */ @core.attr(String) public snapshotName?: string | core.StringOut; /** * (Optional) The number of days for which MemoryDB retains automatic snapshots before deleting them. W * hen set to `0`, automatic backups are disabled. Defaults to `0`. */ @core.attr(Number, { computed: true }) public snapshotRetentionLimit?: number | core.NumberOut; /** * (Optional) The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of you * r shard. Example: `05:00-09:00`. */ @core.attr(String, { computed: true }) public snapshotWindow?: string | core.StringOut; /** * (Optional) ARN of the SNS topic to which cluster notifications are sent. */ @core.attr(String) public snsTopicArn?: string | core.StringOut; /** * (Optional, Forces new resource) The name of the subnet group to be used for the cluster. Defaults to * a subnet group consisting of default VPC subnets. */ @core.attr(String, { computed: true }) public subnetGroupName?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional, Forces new resource) A flag to enable in-transit encryption on the cluster. When set to ` * false`, the `acl_name` must be `open-access`. Defaults to `true`. */ @core.attr(Boolean) public tlsEnabled?: boolean | core.BooleanOut; constructor(name: string, args?: ClusterArgs) { super(name, "aws_memorydb_cluster", args); } public override getNamespace(): string { return "aws_memorydb"; } }