// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS ElastiCache */ export interface ElasticacheClusterConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#apply_immediately ElasticacheCluster#apply_immediately} */ readonly applyImmediately?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#availability_zone ElasticacheCluster#availability_zone} */ readonly availabilityZone?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#az_mode ElasticacheCluster#az_mode} */ readonly azMode?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#cluster_id ElasticacheCluster#cluster_id} */ readonly clusterId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#engine ElasticacheCluster#engine} */ readonly engine?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#engine_version ElasticacheCluster#engine_version} */ readonly engineVersion?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#final_snapshot_identifier ElasticacheCluster#final_snapshot_identifier} */ readonly finalSnapshotIdentifier?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#maintenance_window ElasticacheCluster#maintenance_window} */ readonly maintenanceWindow?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#node_type ElasticacheCluster#node_type} */ readonly nodeType?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#notification_topic_arn ElasticacheCluster#notification_topic_arn} */ readonly notificationTopicArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#num_cache_nodes ElasticacheCluster#num_cache_nodes} */ readonly numCacheNodes?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#parameter_group_name ElasticacheCluster#parameter_group_name} */ readonly parameterGroupName?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#port ElasticacheCluster#port} */ readonly port?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#preferred_availability_zones ElasticacheCluster#preferred_availability_zones} */ readonly preferredAvailabilityZones?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#replication_group_id ElasticacheCluster#replication_group_id} */ readonly replicationGroupId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#security_group_ids ElasticacheCluster#security_group_ids} */ readonly securityGroupIds?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#security_group_names ElasticacheCluster#security_group_names} */ readonly securityGroupNames?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#snapshot_arns ElasticacheCluster#snapshot_arns} */ readonly snapshotArns?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#snapshot_name ElasticacheCluster#snapshot_name} */ readonly snapshotName?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#snapshot_retention_limit ElasticacheCluster#snapshot_retention_limit} */ readonly snapshotRetentionLimit?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#snapshot_window ElasticacheCluster#snapshot_window} */ readonly snapshotWindow?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#subnet_group_name ElasticacheCluster#subnet_group_name} */ readonly subnetGroupName?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#tags ElasticacheCluster#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html#tags_all ElasticacheCluster#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; } export class ElasticacheClusterCacheNodes extends cdktf.ComplexComputedList { // address - computed: true, optional: false, required: false public get address() { return this.getStringAttribute('address'); } // availability_zone - computed: true, optional: false, required: false public get availabilityZone() { return this.getStringAttribute('availability_zone'); } // id - computed: true, optional: false, required: false public get id() { return this.getStringAttribute('id'); } // port - computed: true, optional: false, required: false public get port() { return this.getNumberAttribute('port'); } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html aws_elasticache_cluster} */ export class ElasticacheCluster extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_elasticache_cluster"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html aws_elasticache_cluster} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options ElasticacheClusterConfig */ public constructor(scope: Construct, id: string, config: ElasticacheClusterConfig) { super(scope, id, { terraformResourceType: 'aws_elasticache_cluster', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._applyImmediately = config.applyImmediately; this._availabilityZone = config.availabilityZone; this._azMode = config.azMode; this._clusterId = config.clusterId; this._engine = config.engine; this._engineVersion = config.engineVersion; this._finalSnapshotIdentifier = config.finalSnapshotIdentifier; this._maintenanceWindow = config.maintenanceWindow; this._nodeType = config.nodeType; this._notificationTopicArn = config.notificationTopicArn; this._numCacheNodes = config.numCacheNodes; this._parameterGroupName = config.parameterGroupName; this._port = config.port; this._preferredAvailabilityZones = config.preferredAvailabilityZones; this._replicationGroupId = config.replicationGroupId; this._securityGroupIds = config.securityGroupIds; this._securityGroupNames = config.securityGroupNames; this._snapshotArns = config.snapshotArns; this._snapshotName = config.snapshotName; this._snapshotRetentionLimit = config.snapshotRetentionLimit; this._snapshotWindow = config.snapshotWindow; this._subnetGroupName = config.subnetGroupName; this._tags = config.tags; this._tagsAll = config.tagsAll; } // ========== // ATTRIBUTES // ========== // apply_immediately - computed: true, optional: true, required: false private _applyImmediately?: boolean | cdktf.IResolvable; public get applyImmediately() { return this.getBooleanAttribute('apply_immediately') as any; } public set applyImmediately(value: boolean | cdktf.IResolvable) { this._applyImmediately = value; } public resetApplyImmediately() { this._applyImmediately = undefined; } // Temporarily expose input value. Use with caution. public get applyImmediatelyInput() { return this._applyImmediately; } // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // availability_zone - computed: true, optional: true, required: false private _availabilityZone?: string; public get availabilityZone() { return this.getStringAttribute('availability_zone'); } public set availabilityZone(value: string) { this._availabilityZone = value; } public resetAvailabilityZone() { this._availabilityZone = undefined; } // Temporarily expose input value. Use with caution. public get availabilityZoneInput() { return this._availabilityZone; } // az_mode - computed: true, optional: true, required: false private _azMode?: string; public get azMode() { return this.getStringAttribute('az_mode'); } public set azMode(value: string) { this._azMode = value; } public resetAzMode() { this._azMode = undefined; } // Temporarily expose input value. Use with caution. public get azModeInput() { return this._azMode; } // cache_nodes - computed: true, optional: false, required: false public cacheNodes(index: string) { return new ElasticacheClusterCacheNodes(this, 'cache_nodes', index); } // cluster_address - computed: true, optional: false, required: false public get clusterAddress() { return this.getStringAttribute('cluster_address'); } // cluster_id - computed: false, optional: false, required: true private _clusterId?: string; public get clusterId() { return this.getStringAttribute('cluster_id'); } public set clusterId(value: string) { this._clusterId = value; } // Temporarily expose input value. Use with caution. public get clusterIdInput() { return this._clusterId; } // configuration_endpoint - computed: true, optional: false, required: false public get configurationEndpoint() { return this.getStringAttribute('configuration_endpoint'); } // engine - computed: true, optional: true, required: false private _engine?: string; public get engine() { return this.getStringAttribute('engine'); } public set engine(value: string) { this._engine = value; } public resetEngine() { this._engine = undefined; } // Temporarily expose input value. Use with caution. public get engineInput() { return this._engine; } // engine_version - computed: true, optional: true, required: false private _engineVersion?: string; public get engineVersion() { return this.getStringAttribute('engine_version'); } public set engineVersion(value: string) { this._engineVersion = value; } public resetEngineVersion() { this._engineVersion = undefined; } // Temporarily expose input value. Use with caution. public get engineVersionInput() { return this._engineVersion; } // engine_version_actual - computed: true, optional: false, required: false public get engineVersionActual() { return this.getStringAttribute('engine_version_actual'); } // final_snapshot_identifier - computed: false, optional: true, required: false private _finalSnapshotIdentifier?: string; public get finalSnapshotIdentifier() { return this.getStringAttribute('final_snapshot_identifier'); } public set finalSnapshotIdentifier(value: string) { this._finalSnapshotIdentifier = value; } public resetFinalSnapshotIdentifier() { this._finalSnapshotIdentifier = undefined; } // Temporarily expose input value. Use with caution. public get finalSnapshotIdentifierInput() { return this._finalSnapshotIdentifier; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // maintenance_window - computed: true, optional: true, required: false private _maintenanceWindow?: string; public get maintenanceWindow() { return this.getStringAttribute('maintenance_window'); } public set maintenanceWindow(value: string) { this._maintenanceWindow = value; } public resetMaintenanceWindow() { this._maintenanceWindow = undefined; } // Temporarily expose input value. Use with caution. public get maintenanceWindowInput() { return this._maintenanceWindow; } // node_type - computed: true, optional: true, required: false private _nodeType?: string; public get nodeType() { return this.getStringAttribute('node_type'); } public set nodeType(value: string) { this._nodeType = value; } public resetNodeType() { this._nodeType = undefined; } // Temporarily expose input value. Use with caution. public get nodeTypeInput() { return this._nodeType; } // notification_topic_arn - computed: false, optional: true, required: false private _notificationTopicArn?: string; public get notificationTopicArn() { return this.getStringAttribute('notification_topic_arn'); } public set notificationTopicArn(value: string) { this._notificationTopicArn = value; } public resetNotificationTopicArn() { this._notificationTopicArn = undefined; } // Temporarily expose input value. Use with caution. public get notificationTopicArnInput() { return this._notificationTopicArn; } // num_cache_nodes - computed: true, optional: true, required: false private _numCacheNodes?: number; public get numCacheNodes() { return this.getNumberAttribute('num_cache_nodes'); } public set numCacheNodes(value: number) { this._numCacheNodes = value; } public resetNumCacheNodes() { this._numCacheNodes = undefined; } // Temporarily expose input value. Use with caution. public get numCacheNodesInput() { return this._numCacheNodes; } // parameter_group_name - computed: true, optional: true, required: false private _parameterGroupName?: string; public get parameterGroupName() { return this.getStringAttribute('parameter_group_name'); } public set parameterGroupName(value: string) { this._parameterGroupName = value; } public resetParameterGroupName() { this._parameterGroupName = undefined; } // Temporarily expose input value. Use with caution. public get parameterGroupNameInput() { return this._parameterGroupName; } // port - computed: true, optional: true, required: false private _port?: number; public get port() { return this.getNumberAttribute('port'); } public set port(value: number) { this._port = value; } public resetPort() { this._port = undefined; } // Temporarily expose input value. Use with caution. public get portInput() { return this._port; } // preferred_availability_zones - computed: false, optional: true, required: false private _preferredAvailabilityZones?: string[]; public get preferredAvailabilityZones() { return this.getListAttribute('preferred_availability_zones'); } public set preferredAvailabilityZones(value: string[]) { this._preferredAvailabilityZones = value; } public resetPreferredAvailabilityZones() { this._preferredAvailabilityZones = undefined; } // Temporarily expose input value. Use with caution. public get preferredAvailabilityZonesInput() { return this._preferredAvailabilityZones; } // replication_group_id - computed: true, optional: true, required: false private _replicationGroupId?: string; public get replicationGroupId() { return this.getStringAttribute('replication_group_id'); } public set replicationGroupId(value: string) { this._replicationGroupId = value; } public resetReplicationGroupId() { this._replicationGroupId = undefined; } // Temporarily expose input value. Use with caution. public get replicationGroupIdInput() { return this._replicationGroupId; } // security_group_ids - computed: true, optional: true, required: false private _securityGroupIds?: string[]; public get securityGroupIds() { return this.getListAttribute('security_group_ids'); } public set securityGroupIds(value: string[]) { this._securityGroupIds = value; } public resetSecurityGroupIds() { this._securityGroupIds = undefined; } // Temporarily expose input value. Use with caution. public get securityGroupIdsInput() { return this._securityGroupIds; } // security_group_names - computed: true, optional: true, required: false private _securityGroupNames?: string[]; public get securityGroupNames() { return this.getListAttribute('security_group_names'); } public set securityGroupNames(value: string[]) { this._securityGroupNames = value; } public resetSecurityGroupNames() { this._securityGroupNames = undefined; } // Temporarily expose input value. Use with caution. public get securityGroupNamesInput() { return this._securityGroupNames; } // snapshot_arns - computed: false, optional: true, required: false private _snapshotArns?: string[]; public get snapshotArns() { return this.getListAttribute('snapshot_arns'); } public set snapshotArns(value: string[]) { this._snapshotArns = value; } public resetSnapshotArns() { this._snapshotArns = undefined; } // Temporarily expose input value. Use with caution. public get snapshotArnsInput() { return this._snapshotArns; } // snapshot_name - computed: false, optional: true, required: false private _snapshotName?: string; public get snapshotName() { return this.getStringAttribute('snapshot_name'); } public set snapshotName(value: string) { this._snapshotName = value; } public resetSnapshotName() { this._snapshotName = undefined; } // Temporarily expose input value. Use with caution. public get snapshotNameInput() { return this._snapshotName; } // snapshot_retention_limit - computed: false, optional: true, required: false private _snapshotRetentionLimit?: number; public get snapshotRetentionLimit() { return this.getNumberAttribute('snapshot_retention_limit'); } public set snapshotRetentionLimit(value: number) { this._snapshotRetentionLimit = value; } public resetSnapshotRetentionLimit() { this._snapshotRetentionLimit = undefined; } // Temporarily expose input value. Use with caution. public get snapshotRetentionLimitInput() { return this._snapshotRetentionLimit; } // snapshot_window - computed: true, optional: true, required: false private _snapshotWindow?: string; public get snapshotWindow() { return this.getStringAttribute('snapshot_window'); } public set snapshotWindow(value: string) { this._snapshotWindow = value; } public resetSnapshotWindow() { this._snapshotWindow = undefined; } // Temporarily expose input value. Use with caution. public get snapshotWindowInput() { return this._snapshotWindow; } // subnet_group_name - computed: true, optional: true, required: false private _subnetGroupName?: string; public get subnetGroupName() { return this.getStringAttribute('subnet_group_name'); } public set subnetGroupName(value: string) { this._subnetGroupName = value; } public resetSubnetGroupName() { this._subnetGroupName = undefined; } // Temporarily expose input value. Use with caution. public get subnetGroupNameInput() { return this._subnetGroupName; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { apply_immediately: cdktf.booleanToTerraform(this._applyImmediately), availability_zone: cdktf.stringToTerraform(this._availabilityZone), az_mode: cdktf.stringToTerraform(this._azMode), cluster_id: cdktf.stringToTerraform(this._clusterId), engine: cdktf.stringToTerraform(this._engine), engine_version: cdktf.stringToTerraform(this._engineVersion), final_snapshot_identifier: cdktf.stringToTerraform(this._finalSnapshotIdentifier), maintenance_window: cdktf.stringToTerraform(this._maintenanceWindow), node_type: cdktf.stringToTerraform(this._nodeType), notification_topic_arn: cdktf.stringToTerraform(this._notificationTopicArn), num_cache_nodes: cdktf.numberToTerraform(this._numCacheNodes), parameter_group_name: cdktf.stringToTerraform(this._parameterGroupName), port: cdktf.numberToTerraform(this._port), preferred_availability_zones: cdktf.listMapper(cdktf.stringToTerraform)(this._preferredAvailabilityZones), replication_group_id: cdktf.stringToTerraform(this._replicationGroupId), security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(this._securityGroupIds), security_group_names: cdktf.listMapper(cdktf.stringToTerraform)(this._securityGroupNames), snapshot_arns: cdktf.listMapper(cdktf.stringToTerraform)(this._snapshotArns), snapshot_name: cdktf.stringToTerraform(this._snapshotName), snapshot_retention_limit: cdktf.numberToTerraform(this._snapshotRetentionLimit), snapshot_window: cdktf.stringToTerraform(this._snapshotWindow), subnet_group_name: cdktf.stringToTerraform(this._subnetGroupName), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), }; } }