Class RedisInstance.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static RedisInstance.Builder create​(software.constructs.Construct scope,
                                                   String id)
        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        Returns:
        a new instance of RedisInstance.Builder.
      • connection

        @Stability(Experimental)
        public RedisInstance.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public RedisInstance.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public RedisInstance.Builder count​(Number count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public RedisInstance.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public RedisInstance.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public RedisInstance.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public RedisInstance.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public RedisInstance.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public RedisInstance.Builder provisioners​(List<? extends Object> provisioners)
        Parameters:
        provisioners - This parameter is required.
        Returns:
        this
      • memorySizeGb

        @Stability(Stable)
        public RedisInstance.Builder memorySizeGb​(Number memorySizeGb)
        Redis memory size in GiB.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#memory_size_gb RedisInstance#memory_size_gb}

        Parameters:
        memorySizeGb - Redis memory size in GiB. This parameter is required.
        Returns:
        this
      • name

        @Stability(Stable)
        public RedisInstance.Builder name​(String name)
        The ID of the instance or a fully qualified identifier for the instance.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#name RedisInstance#name}

        Parameters:
        name - The ID of the instance or a fully qualified identifier for the instance. This parameter is required.
        Returns:
        this
      • alternativeLocationId

        @Stability(Stable)
        public RedisInstance.Builder alternativeLocationId​(String alternativeLocationId)
        Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones.

        If provided, it must be a different zone from the one provided in [locationId]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#alternative_location_id RedisInstance#alternative_location_id}

        Parameters:
        alternativeLocationId - Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones. This parameter is required.
        Returns:
        this
      • authEnabled

        @Stability(Stable)
        public RedisInstance.Builder authEnabled​(Boolean authEnabled)
        Optional.

        Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#auth_enabled RedisInstance#auth_enabled}

        Parameters:
        authEnabled - Optional. This parameter is required.
        Returns:
        this
      • authEnabled

        @Stability(Stable)
        public RedisInstance.Builder authEnabled​(com.hashicorp.cdktf.IResolvable authEnabled)
        Optional.

        Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#auth_enabled RedisInstance#auth_enabled}

        Parameters:
        authEnabled - Optional. This parameter is required.
        Returns:
        this
      • authorizedNetwork

        @Stability(Stable)
        public RedisInstance.Builder authorizedNetwork​(String authorizedNetwork)
        The full name of the Google Compute Engine network to which the instance is connected.

        If left unspecified, the default network will be used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#authorized_network RedisInstance#authorized_network}

        Parameters:
        authorizedNetwork - The full name of the Google Compute Engine network to which the instance is connected. This parameter is required.
        Returns:
        this
      • connectMode

        @Stability(Stable)
        public RedisInstance.Builder connectMode​(String connectMode)
        The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"].

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#connect_mode RedisInstance#connect_mode}

        Parameters:
        connectMode - The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"]. This parameter is required.
        Returns:
        this
      • customerManagedKey

        @Stability(Stable)
        public RedisInstance.Builder customerManagedKey​(String customerManagedKey)
        Optional.

        The KMS key reference that you want to use to encrypt the data at rest for this Redis instance. If this is provided, CMEK is enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#customer_managed_key RedisInstance#customer_managed_key}

        Parameters:
        customerManagedKey - Optional. This parameter is required.
        Returns:
        this
      • displayName

        @Stability(Stable)
        public RedisInstance.Builder displayName​(String displayName)
        An arbitrary and optional user-provided name for the instance.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#display_name RedisInstance#display_name}

        Parameters:
        displayName - An arbitrary and optional user-provided name for the instance. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public RedisInstance.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#id RedisInstance#id}.

        Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#id RedisInstance#id}. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public RedisInstance.Builder labels​(Map<String,​String> labels)
        Resource labels to represent user provided metadata.

        **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#labels RedisInstance#labels}

        Parameters:
        labels - Resource labels to represent user provided metadata. This parameter is required.
        Returns:
        this
      • locationId

        @Stability(Stable)
        public RedisInstance.Builder locationId​(String locationId)
        The zone where the instance will be provisioned.

        If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#location_id RedisInstance#location_id}

        Parameters:
        locationId - The zone where the instance will be provisioned. This parameter is required.
        Returns:
        this
      • maintenancePolicy

        @Stability(Stable)
        public RedisInstance.Builder maintenancePolicy​(RedisInstanceMaintenancePolicy maintenancePolicy)
        maintenance_policy block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#maintenance_policy RedisInstance#maintenance_policy}

        Parameters:
        maintenancePolicy - maintenance_policy block. This parameter is required.
        Returns:
        this
      • maintenanceVersion

        @Stability(Stable)
        public RedisInstance.Builder maintenanceVersion​(String maintenanceVersion)
        The self service update maintenance version.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#maintenance_version RedisInstance#maintenance_version}

        Parameters:
        maintenanceVersion - The self service update maintenance version. This parameter is required.
        Returns:
        this
      • persistenceConfig

        @Stability(Stable)
        public RedisInstance.Builder persistenceConfig​(RedisInstancePersistenceConfig persistenceConfig)
        persistence_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#persistence_config RedisInstance#persistence_config}

        Parameters:
        persistenceConfig - persistence_config block. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public RedisInstance.Builder project​(String project)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#project RedisInstance#project}.

        Parameters:
        project - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#project RedisInstance#project}. This parameter is required.
        Returns:
        this
      • readReplicasMode

        @Stability(Stable)
        public RedisInstance.Builder readReplicasMode​(String readReplicasMode)
        Optional.

        Read replica mode. Can only be specified when trying to create the instance. If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. * READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the instance cannot scale up or down the number of replicas. * READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#read_replicas_mode RedisInstance#read_replicas_mode}

        Parameters:
        readReplicasMode - Optional. This parameter is required.
        Returns:
        this
      • redisConfigs

        @Stability(Stable)
        public RedisInstance.Builder redisConfigs​(Map<String,​String> redisConfigs)
        Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#redis_configs RedisInstance#redis_configs}

        Parameters:
        redisConfigs - Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs. This parameter is required.
        Returns:
        this
      • redisVersion

        @Stability(Stable)
        public RedisInstance.Builder redisVersion​(String redisVersion)
        The version of Redis software.

        If not provided, latest supported version will be used. Please check the API documentation linked at the top for the latest valid values. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#redis_version RedisInstance#redis_version}

        Parameters:
        redisVersion - The version of Redis software. This parameter is required.
        Returns:
        this
      • region

        @Stability(Stable)
        public RedisInstance.Builder region​(String region)
        The name of the Redis region of the instance.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#region RedisInstance#region}

        Parameters:
        region - The name of the Redis region of the instance. This parameter is required.
        Returns:
        this
      • replicaCount

        @Stability(Stable)
        public RedisInstance.Builder replicaCount​(Number replicaCount)
        Optional.

        The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#replica_count RedisInstance#replica_count}

        Parameters:
        replicaCount - Optional. This parameter is required.
        Returns:
        this
      • reservedIpRange

        @Stability(Stable)
        public RedisInstance.Builder reservedIpRange​(String reservedIpRange)
        The CIDR range of internal addresses that are reserved for this instance.

        If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#reserved_ip_range RedisInstance#reserved_ip_range}

        Parameters:
        reservedIpRange - The CIDR range of internal addresses that are reserved for this instance. This parameter is required.
        Returns:
        this
      • secondaryIpRange

        @Stability(Stable)
        public RedisInstance.Builder secondaryIpRange​(String secondaryIpRange)
        Optional.

        Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#secondary_ip_range RedisInstance#secondary_ip_range}

        Parameters:
        secondaryIpRange - Optional. This parameter is required.
        Returns:
        this
      • tier

        @Stability(Stable)
        public RedisInstance.Builder tier​(String tier)
        The service tier of the instance. Must be one of these values:.

        * BASIC: standalone instance * STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#tier RedisInstance#tier}

        Parameters:
        tier - The service tier of the instance. Must be one of these values:. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public RedisInstance.Builder timeouts​(RedisInstanceTimeouts timeouts)
        timeouts block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#timeouts RedisInstance#timeouts}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this
      • transitEncryptionMode

        @Stability(Stable)
        public RedisInstance.Builder transitEncryptionMode​(String transitEncryptionMode)
        The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance.

        * SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#transit_encryption_mode RedisInstance#transit_encryption_mode}

        Parameters:
        transitEncryptionMode - The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. This parameter is required.
        Returns:
        this