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 — require_tls: the TLS requirement is fixed at create (the platform refuses a change with REQUIRE_TLS_IMMUTABLE); a change re-creates the instance, and an instance whose state predates the attribute is never replaced for it.
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 — hostname: platform-derived at create from name's DNS label, the VPC, tenant and organization; fixed for life (a rename does not move it), null on an instance built before TLS. port: the plaintext listener (6379), null when require_tls is true (the platform closes it). 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. tls_enabled: whether the instance serves TLS on tls_port with a Frostmoln-issued certificate: set when the platform issues one at create, false for an instance built before TLS. tls_port: the TLS listener (6380) while the instance serves TLS, null otherwise.
Example Usage
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"
# TLS: omit require_tls for the platform default (TLS only, on tls_port 6380,
# with the plaintext port 6379 closed and `port` null, once TLS for managed
# caches is available in the deployment). Set it to false only for clients
# that cannot do TLS (6379 then stays open beside 6380). Fixed at create;
# changing it replaces the instance.
# require_tls = false
# 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"
}
}
# With TLS: rediss:// on the hostname, verified against the bundle from the
# frostmoln_ca_bundle data source (redis-cli --tls --cacert <bundle> --sni <hostname>).
# port is null when the instance requires TLS.
output "redis_tls_endpoint" {
value = frostmoln_redis_instance.cache.tls_enabled ? "rediss://${frostmoln_redis_instance.cache.hostname}:${frostmoln_redis_instance.cache.tls_port}" : null
}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).require_tls(Boolean) Whether the instance serves TLS only: true serves TLS ontls_port(6380) with the plaintext port 6379 closed (portis null); false serves plaintext onportbeside TLS. When omitted the platform default applies: TLS required once TLS for managed caches is available in the deployment; while it is not, the instance is created without TLS and reports false, and an explicittrueis refused (REQUIRE_TLS_UNAVAILABLE). Set false only for clients that cannot do TLS. Fixed at create: changing it replaces the instance. Instances created before the setting existed report false. True withtls_enabledfalse means the instance has no usable endpoint (it is in statuserror); recreate 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=valuein the API,--tagin 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 beginningfrostmoln_orfrostmoln-(any case) are reserved. Merged with the provider'sdefault_tagson every write (a key set here wins). Holds only the keys this configuration sets; the full set is intags_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.hostname(String) The instance's internal DNS name (<label>.cache.<vpc-label>.<tenant-label>.<org-label>.fm.internal, the label derived from the name at create), resolvable inside its VPC; its TLS certificate is issued for this name. Fixed once assigned: a rename does not move it. Null on an instance built before TLS.id(String) The unique identifier of the Redis instance.port(Number) The plaintext port (6379). Null whenrequire_tlsis true: the plaintext port is closed and the instance serves TLS ontls_portonly.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'sdefault_tags, this resource's owntags(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.tls_enabled(Boolean) Whether the instance serves TLS ontls_portwith a certificate forhostnamefrom the Frostmoln customer CA (trust the bundle from thefrostmoln_ca_bundledata source; e.g.redis-cli --tls --cacert <bundle> --sni <hostname>). False on an instance built before TLS: it gets no certificate retroactively; recreate it to get one.tls_port(Number) The TLS port (6380) while the instance serves TLS; null otherwise.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").