import * as core from "@terrascript/core"; export interface LoggingArgs extends core.SchemaArgs { bucketName?: string | core.StringOut; enable: boolean | core.BooleanOut; logDestinationType?: string | core.StringOut; logExports?: core.Array | core.ArrayOut; s3KeyPrefix?: string | core.StringOut; } export class Logging extends core.Schema { @core.attr(String, { computed: true }) public bucketName?: string | core.StringOut; @core.attr(Boolean) public enable!: boolean | core.BooleanOut; @core.attr(String) public logDestinationType?: string | core.StringOut; @core.attr(String, { kind: "array" }) public logExports?: core.Array | core.ArrayOut; @core.attr(String, { computed: true }) public s3KeyPrefix?: string | core.StringOut; } export interface ClusterNodesArgs extends core.SchemaArgs { nodeRole: string | core.StringOut; privateIpAddress: string | core.StringOut; publicIpAddress: string | core.StringOut; } export class ClusterNodes extends core.Schema { @core.attr(String, { computed: true }) public nodeRole!: string | core.StringOut; @core.attr(String, { computed: true }) public privateIpAddress!: string | core.StringOut; @core.attr(String, { computed: true }) public publicIpAddress!: string | core.StringOut; } export interface SnapshotCopyArgs extends core.SchemaArgs { destinationRegion: string | core.StringOut; grantName?: string | core.StringOut; retentionPeriod?: number | core.NumberOut; } export class SnapshotCopy extends core.Schema { @core.attr(String) public destinationRegion!: string | core.StringOut; @core.attr(String) public grantName?: string | core.StringOut; @core.attr(Number) public retentionPeriod?: number | core.NumberOut; } export interface ClusterArgs extends core.ResourceArgs { /** * (Optional) If true , major version upgrades can be applied during the maintenance window to the Amaz * on Redshift engine that is running on the cluster. Default is `true`. */ allowVersionUpgrade?: boolean | core.BooleanOut; /** * (Optional) Specifies whether any cluster modifications are applied immediately, or during the next m * aintenance window. Default is `false`. */ applyImmediately?: boolean | core.BooleanOut; /** * (Optional) The value represents how the cluster is configured to use AQUA (Advanced Query Accelerato * r) after the cluster is restored. Possible values are `enabled`, `disabled`, and `auto`. Requires Cl * uster reboot. */ aquaConfigurationStatus?: string | core.StringOut; /** * (Optional) The number of days that automated snapshots are retained. If the value is 0, automated sn * apshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshot * s when you want with create-cluster-snapshot. Default is 1. */ automatedSnapshotRetentionPeriod?: number | core.NumberOut; /** * (Optional) The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster * . For example, if you have several EC2 instances running in a specific Availability Zone, then you m * ight want the cluster to be provisioned in the same zone in order to decrease network latency. Can o * nly be changed if `availability_zone_relocation_enabled` is `true`. */ availabilityZone?: string | core.StringOut; /** * (Optional) If true, the cluster can be relocated to another availabity zone, either automatically by * AWS or when requested. Default is `false`. Available for use on clusters from the RA3 instance fami * ly. */ availabilityZoneRelocationEnabled?: boolean | core.BooleanOut; /** * (Required) The Cluster Identifier. Must be a lower case string. */ clusterIdentifier: string | core.StringOut; /** * (Optional) The name of the parameter group to be associated with this cluster. */ clusterParameterGroupName?: string | core.StringOut; /** * The public key for the cluster */ clusterPublicKey?: string | core.StringOut; /** * The specific revision number of the database in the cluster */ clusterRevisionNumber?: string | core.StringOut; /** * (Optional) A list of security groups to be associated with this cluster. */ clusterSecurityGroups?: core.Array | core.ArrayOut; /** * (Optional) The name of a cluster subnet group to be associated with this cluster. If this parameter * is not provided the resulting cluster will be deployed outside virtual private cloud (VPC). */ clusterSubnetGroupName?: string | core.StringOut; /** * (Optional) The cluster type to use. Either `single-node` or `multi-node`. */ clusterType?: string | core.StringOut; /** * (Optional) The version of the Amazon Redshift engine software that you want to deploy on the cluster * . */ clusterVersion?: string | core.StringOut; /** * (Optional) The name of the first database to be created when the cluster is created. */ databaseName?: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster w * hen the cluster was created. */ defaultIamRoleArn?: string | core.StringOut; /** * (Optional) The Elastic IP (EIP) address for the cluster. */ elasticIp?: string | core.StringOut; /** * (Optional) If true , the data in the cluster is encrypted at rest. */ encrypted?: boolean | core.BooleanOut; /** * The connection endpoint */ endpoint?: string | core.StringOut; /** * (Optional) If true , enhanced VPC routing is enabled. */ enhancedVpcRouting?: boolean | core.BooleanOut; /** * (Optional) The identifier of the final snapshot that is to be created immediately before deleting th * e cluster. If this parameter is provided, `skip_final_snapshot` must be false. */ finalSnapshotIdentifier?: string | core.StringOut; /** * (Optional) A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated * to the cluster at any time. */ iamRoles?: core.Array | core.ArrayOut; /** * (Optional) The ARN for the KMS encryption key. When specifying `kms_key_id`, `encrypted` needs to be * set to true. */ kmsKeyId?: string | core.StringOut; /** * (Optional) Logging, documented below. */ logging?: Logging; /** * (Optional) The name of the maintenance track for the restored cluster. When you take a snapshot, the * snapshot inherits the MaintenanceTrack value from the cluster. The snapshot might be on a different * track than the cluster that was the source for the snapshot. For example, suppose that you take a s * napshot of a cluster that is on the current track and then change the cluster to be on the trailing * track. In this case, the snapshot and the source cluster are on different tracks. Default value is * current`. */ maintenanceTrackName?: string | core.StringOut; /** * (Optional) The default number of days to retain a manual snapshot. If the value is -1, the snapshot * is retained indefinitely. This setting doesn't change the retention period of existing snapshots. V * alid values are between `-1` and `3653`. Default value is `-1`. */ manualSnapshotRetentionPeriod?: number | core.NumberOut; /** * (Required unless a `snapshot_identifier` is provided) Password for the master DB user. */ masterPassword?: string | core.StringOut; /** * (Required unless a `snapshot_identifier` is provided) Username for the master DB user. */ masterUsername?: string | core.StringOut; /** * (Required) The node type to be provisioned for the cluster. */ nodeType: string | core.StringOut; /** * (Optional) The number of compute nodes in the cluster. This parameter is required when the ClusterTy * pe parameter is specified as multi-node. Default is 1. */ numberOfNodes?: number | core.NumberOut; /** * (Optional) The AWS customer account used to create or copy the snapshot. Required if you are restori * ng a snapshot you do not own, optional if you own the snapshot. */ ownerAccount?: string | core.StringOut; /** * (Optional) The port number on which the cluster accepts incoming connections. Valid values are betwe * en `1115` and `65535`. */ port?: number | core.NumberOut; /** * (Optional) The weekly time range (in UTC) during which automated cluster maintenance can occur. */ preferredMaintenanceWindow?: string | core.StringOut; /** * (Optional) If true, the cluster can be accessed from a public network. Default is `true`. */ publiclyAccessible?: boolean | core.BooleanOut; /** * (Optional) Determines whether a final snapshot of the cluster is created before Amazon Redshift dele * tes the cluster. If true , a final cluster snapshot is not created. If false , a final cluster snaps * hot is created before the cluster is deleted. Default is false. */ skipFinalSnapshot?: boolean | core.BooleanOut; /** * (Optional) The name of the cluster the source snapshot was created from. */ snapshotClusterIdentifier?: string | core.StringOut; /** * (Optional) Configuration of automatic copy of snapshots from one region to another. Documented below * . */ snapshotCopy?: SnapshotCopy; /** * (Optional) The name of the snapshot from which to create the new cluster. */ snapshotIdentifier?: 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) A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster. */ vpcSecurityGroupIds?: core.Array | core.ArrayOut; } export class Cluster extends core.Resource { /** * (Optional) If true , major version upgrades can be applied during the maintenance window to the Amaz * on Redshift engine that is running on the cluster. Default is `true`. */ @core.attr(Boolean) public allowVersionUpgrade?: boolean | core.BooleanOut; /** * (Optional) Specifies whether any cluster modifications are applied immediately, or during the next m * aintenance window. Default is `false`. */ @core.attr(Boolean) public applyImmediately?: boolean | core.BooleanOut; /** * (Optional) The value represents how the cluster is configured to use AQUA (Advanced Query Accelerato * r) after the cluster is restored. Possible values are `enabled`, `disabled`, and `auto`. Requires Cl * uster reboot. */ @core.attr(String, { computed: true }) public aquaConfigurationStatus?: string | core.StringOut; /** * Amazon Resource Name (ARN) of cluster */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) The number of days that automated snapshots are retained. If the value is 0, automated sn * apshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshot * s when you want with create-cluster-snapshot. Default is 1. */ @core.attr(Number) public automatedSnapshotRetentionPeriod?: number | core.NumberOut; /** * (Optional) The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster * . For example, if you have several EC2 instances running in a specific Availability Zone, then you m * ight want the cluster to be provisioned in the same zone in order to decrease network latency. Can o * nly be changed if `availability_zone_relocation_enabled` is `true`. */ @core.attr(String, { computed: true }) public availabilityZone?: string | core.StringOut; /** * (Optional) If true, the cluster can be relocated to another availabity zone, either automatically by * AWS or when requested. Default is `false`. Available for use on clusters from the RA3 instance fami * ly. */ @core.attr(Boolean) public availabilityZoneRelocationEnabled?: boolean | core.BooleanOut; /** * (Required) The Cluster Identifier. Must be a lower case string. */ @core.attr(String) public clusterIdentifier!: string | core.StringOut; /** * The nodes in the cluster. Cluster node blocks are documented below */ @core.attr(ClusterNodes, { computed: true, kind: "array" }) public clusterNodes!: core.Array | core.ArrayOut; /** * (Optional) The name of the parameter group to be associated with this cluster. */ @core.attr(String, { computed: true }) public clusterParameterGroupName?: string | core.StringOut; /** * The public key for the cluster */ @core.attr(String, { computed: true }) public clusterPublicKey?: string | core.StringOut; /** * The specific revision number of the database in the cluster */ @core.attr(String, { computed: true }) public clusterRevisionNumber?: string | core.StringOut; /** * (Optional) A list of security groups to be associated with this cluster. */ @core.attr(String, { computed: true, kind: "array" }) public clusterSecurityGroups?: | core.Array | core.ArrayOut; /** * (Optional) The name of a cluster subnet group to be associated with this cluster. If this parameter * is not provided the resulting cluster will be deployed outside virtual private cloud (VPC). */ @core.attr(String, { computed: true }) public clusterSubnetGroupName?: string | core.StringOut; /** * (Optional) The cluster type to use. Either `single-node` or `multi-node`. */ @core.attr(String, { computed: true }) public clusterType?: string | core.StringOut; /** * (Optional) The version of the Amazon Redshift engine software that you want to deploy on the cluster * . */ @core.attr(String) public clusterVersion?: string | core.StringOut; /** * (Optional) The name of the first database to be created when the cluster is created. */ @core.attr(String, { computed: true }) public databaseName?: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster w * hen the cluster was created. */ @core.attr(String, { computed: true }) public defaultIamRoleArn?: string | core.StringOut; /** * The DNS name of the cluster */ @core.attr(String, { computed: true }) public dnsName!: string | core.StringOut; /** * (Optional) The Elastic IP (EIP) address for the cluster. */ @core.attr(String) public elasticIp?: string | core.StringOut; /** * (Optional) If true , the data in the cluster is encrypted at rest. */ @core.attr(Boolean) public encrypted?: boolean | core.BooleanOut; /** * The connection endpoint */ @core.attr(String, { computed: true }) public endpoint?: string | core.StringOut; /** * (Optional) If true , enhanced VPC routing is enabled. */ @core.attr(Boolean, { computed: true }) public enhancedVpcRouting?: boolean | core.BooleanOut; /** * (Optional) The identifier of the final snapshot that is to be created immediately before deleting th * e cluster. If this parameter is provided, `skip_final_snapshot` must be false. */ @core.attr(String) public finalSnapshotIdentifier?: string | core.StringOut; /** * (Optional) A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated * to the cluster at any time. */ @core.attr(String, { computed: true, kind: "array" }) public iamRoles?: core.Array | core.ArrayOut; /** * The Redshift Cluster ID. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The ARN for the KMS encryption key. When specifying `kms_key_id`, `encrypted` needs to be * set to true. */ @core.attr(String, { computed: true }) public kmsKeyId?: string | core.StringOut; /** * (Optional) Logging, documented below. */ @core.attr(Logging) public logging?: Logging; /** * (Optional) The name of the maintenance track for the restored cluster. When you take a snapshot, the * snapshot inherits the MaintenanceTrack value from the cluster. The snapshot might be on a different * track than the cluster that was the source for the snapshot. For example, suppose that you take a s * napshot of a cluster that is on the current track and then change the cluster to be on the trailing * track. In this case, the snapshot and the source cluster are on different tracks. Default value is * current`. */ @core.attr(String) public maintenanceTrackName?: string | core.StringOut; /** * (Optional) The default number of days to retain a manual snapshot. If the value is -1, the snapshot * is retained indefinitely. This setting doesn't change the retention period of existing snapshots. V * alid values are between `-1` and `3653`. Default value is `-1`. */ @core.attr(Number) public manualSnapshotRetentionPeriod?: number | core.NumberOut; /** * (Required unless a `snapshot_identifier` is provided) Password for the master DB user. */ @core.attr(String) public masterPassword?: string | core.StringOut; /** * (Required unless a `snapshot_identifier` is provided) Username for the master DB user. */ @core.attr(String) public masterUsername?: string | core.StringOut; /** * (Required) The node type to be provisioned for the cluster. */ @core.attr(String) public nodeType!: string | core.StringOut; /** * (Optional) The number of compute nodes in the cluster. This parameter is required when the ClusterTy * pe parameter is specified as multi-node. Default is 1. */ @core.attr(Number) public numberOfNodes?: number | core.NumberOut; /** * (Optional) The AWS customer account used to create or copy the snapshot. Required if you are restori * ng a snapshot you do not own, optional if you own the snapshot. */ @core.attr(String) public ownerAccount?: string | core.StringOut; /** * (Optional) The port number on which the cluster accepts incoming connections. Valid values are betwe * en `1115` and `65535`. */ @core.attr(Number) public port?: number | core.NumberOut; /** * (Optional) The weekly time range (in UTC) during which automated cluster maintenance can occur. */ @core.attr(String, { computed: true }) public preferredMaintenanceWindow?: string | core.StringOut; /** * (Optional) If true, the cluster can be accessed from a public network. Default is `true`. */ @core.attr(Boolean) public publiclyAccessible?: boolean | core.BooleanOut; /** * (Optional) Determines whether a final snapshot of the cluster is created before Amazon Redshift dele * tes the cluster. If true , a final cluster snapshot is not created. If false , a final cluster snaps * hot is created before the cluster is deleted. Default is false. */ @core.attr(Boolean) public skipFinalSnapshot?: boolean | core.BooleanOut; /** * (Optional) The name of the cluster the source snapshot was created from. */ @core.attr(String) public snapshotClusterIdentifier?: string | core.StringOut; /** * (Optional) Configuration of automatic copy of snapshots from one region to another. Documented below * . */ @core.attr(SnapshotCopy) public snapshotCopy?: SnapshotCopy; /** * (Optional) The name of the snapshot from which to create the new cluster. */ @core.attr(String) public snapshotIdentifier?: 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) A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster. */ @core.attr(String, { computed: true, kind: "array" }) public vpcSecurityGroupIds?: | core.Array | core.ArrayOut; constructor(name: string, args?: ClusterArgs) { super(name, "aws_redshift_cluster", args); } public override getNamespace(): string { return "aws_redshift"; } }