Skip to content

frostmoln_redis_instance (Resource) ​

Manages a managed Redis instance in the Frostmoln platform.

Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.

Enacted and reconciled — every configurable attribute not listed below: the platform applies it, and a refresh reads the truth back.

Create-immutable — subnet_id, version, vpc_id: the platform has no in-place migration for it — a change re-creates the instance.

Create-only, change refused (not replaced) — eviction_policy, persistence_mode: the value reaches the running server only in the create render and no workflow re-renders it — a change is validated, stored and echoed while the running server keeps its previous behaviour, so it is warned about at plan and refused at apply; replace the instance to change it.

Observed, not enacted — private_ip: platform-assigned from the subnet at create. tags_all: keys set outside Terraform — in the portal, by the fm CLI, or stamped by the platform — appear only here and are kept on every apply, never removed.

Example Usage ​

terraform
resource "frostmoln_redis_instance" "cache" {
  name      = "my-cache"
  version   = "7.2"
  flavor_id = "cache.mo1.small"
  vpc_id    = frostmoln_vpc.main.id
  subnet_id = frostmoln_subnet.private.id

  persistence_mode = "rdb"
  eviction_policy  = "allkeys-lru"

  # Scheduled backups require a persistence_mode other than "none".
  backup_enabled        = true
  backup_schedule       = "0 2 * * *"
  backup_retention_days = 35

  # Resource tags: your own metadata for search and filtering. Merged with
  # the provider's default_tags; changing them updates in place.
  tags = {
    env = "prod"
  }
}

Schema ​

Required ​

  • flavor_id (String) The flavor/size for the Redis instance (e.g. "cache.mo1.small", "cache.mo1.medium"). Changing this triggers an in-place flavor resize, which RESTARTS the instance (brief downtime) — unlike an online storage grow. Cannot be changed together with storage_gb in the same apply.
  • name (String) The name of the Redis instance.
  • subnet_id (String) The subnet ID where the Redis instance will be deployed.
  • version (String) The Redis version (e.g. "7.2", "7.4").
  • vpc_id (String) The VPC ID where the Redis instance will be deployed.

Optional ​

  • backup_enabled (Boolean) Whether automated backups are enabled. Requires a persistence_mode other than "none".
  • backup_retention_days (Number) Number of days to retain backups. Minimum 35 (backups are immutably object-locked for 35 days); maximum 90. Defaults to 35 server-side.
  • backup_schedule (String) Cron expression for the backup schedule. Defaults to "0 2 * * *".
  • eviction_policy (String) The eviction policy for the Redis instance (e.g. "noeviction", "allkeys-lru"). Defaults to "noeviction", rendered into the instance at creation only — changing it later is refused, because no platform workflow re-renders a running instance (replace the instance to change it).
  • persistence_mode (String) The persistence mode for the Redis instance ("rdb", "aof", or "none"). Defaults to "rdb". Rendered into the instance at creation only — changing it later is refused, because no platform workflow re-renders a running instance (replace the instance to change it).
  • storage_gb (Number) The storage size in gigabytes (defaults to 10 if unset). Can only be increased (grow-only); volumes cannot be shrunk.
  • tags (Map of String) Resource tags on the instance: your own key/value metadata for search and filtering (?tag=key=value in the API, --tag in the fm CLI), stored by the platform only and never applied to the cache server. Changing them updates the instance in place and does not restart or reconfigure it. At most 32 keys including the tenant's default tags, which the platform merges in at create; a key is 1-64 bytes matching ^[a-zA-Z0-9]([a-zA-Z0-9._:/-]*[a-zA-Z0-9])?$, a value at most 256 bytes; keys beginning frostmoln_ or frostmoln- (any case) are reserved. Merged with the provider's default_tags on every write (a key set here wins). Holds only the keys this configuration sets; the full set is in tags_all.
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only ​

  • admin_username (String) The admin username for the Redis instance.
  • created_at (String) The timestamp when the instance was created.
  • id (String) The unique identifier of the Redis instance.
  • port (Number) The port number the Redis instance is listening on.
  • private_ip (String) The private IP address of the Redis instance.
  • status (String) The current status of the Redis instance.
  • tags_all (Map of String) Every tag the platform holds on this resource: the provider's default_tags, this resource's own tags (which win on a shared key), and any key set outside Terraform — in the portal, by the fm CLI, or stamped by the platform. Keys set outside Terraform appear only here and are kept on every apply, never removed.
  • updated_at (String) The timestamp when the instance was last updated.

Nested Schema for timeouts ​

Optional:

  • create (String) How long the provider waits for the create operation to converge before giving up (e.g. "45m", "2h").
  • delete (String) How long the provider waits for the delete to complete before giving up (e.g. "30m").
  • update (String) How long the provider waits for an update (resize, in-place change) to converge before giving up (e.g. "30m").