Skip to content

indexer: support per-parameter apply_method on aws_db_parameter_group#169

Open
UnbornAztecKing wants to merge 4 commits into
mainfrom
rds/pg-apply-method
Open

indexer: support per-parameter apply_method on aws_db_parameter_group#169
UnbornAztecKing wants to merge 4 commits into
mainfrom
rds/pg-apply-method

Conversation

@UnbornAztecKing

@UnbornAztecKing UnbornAztecKing commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Adds the workspace-level knobs needed to describe a real indexer/ deployment without forcing destructive replacements when imported live state diverges from the previously hard-coded module.

variable type default controls
rds_parameter_group_parameters map(object({ value, apply_method = optional("immediate") })) prior 19-entry value-only map, re-shaped parameters on aws_db_parameter_group.main; static params (e.g. rds.logical_replication) can now declare apply_method = "pending-reboot" and not trigger cannot_update replace
rds_main_copy_tags_to_snapshot bool true aws_db_instance.main.copy_tags_to_snapshot
ecs_container_insights string (enhanced/enabled) enhanced containerInsights on aws_ecs_cluster.main in indexer/ and on each module.validator invocation (full_node, snapshot, backup) via new module var container_insights
msk_open_monitoring_jmx_exporter_enabled bool true aws_msk_cluster.main.open_monitoring.prometheus.jmx_exporter.enabled_in_broker
msk_open_monitoring_node_exporter_enabled bool true …node_exporter.enabled_in_broker

Driver

Adopting the live testnet PG into TF state (testnet-indexer-apne1-db-parameter-group-postgres-17) surfaced rds.logical_replication with apply_method = pending-reboot. The prior map(string) schema could not encode apply_method, producing an unresolvable cannot_update diff that planned a full PG replace. Same story for the other four knobs: live testnet diverges from the hard-coded value, no var existed to declare the live value.

Backward compatibility

  • Workspaces using the default for rds_parameter_group_parameters are unaffected.
  • Workspaces that overrode it (testnet) must migrate to the new object shape — { value = "..." }, optionally { value = "...", apply_method = "pending-reboot" }.
  • All other new vars have defaults equal to the prior hard-coded literal.

Reviewer brief

  • indexer/variables.tf — the five new variables.
  • indexer/rds.tfdynamic "parameter" now consumes the object map.
  • indexer/ecs.tf, indexer/msk.tf — single-line literal → var substitution.
  • modules/validator/{ecs,variables}.tf — module-level container_insights var, propagated by indexer's three module.validator callers.

Out of scope

  • Importing externally-named parameter groups in mainnet/internal/staging workspaces.
  • Aligning var.rds_parameter_group_name (instance attachment) with aws_db_parameter_group.main.name.

….main

Changes rds_parameter_group_parameters from map(string) to
map(object({ value, apply_method = optional("immediate") })) so workspaces
can encode pending-reboot for static parameters (e.g. rds.logical_replication)
without forcing an aws_db_parameter_group.main replace on every plan.

Default map preserves the prior values (all immediate). Workspaces using
defaults see no diff; workspaces that have overridden the var must migrate
to the new object shape.
@UnbornAztecKing UnbornAztecKing requested a review from tqin7 June 3, 2026 17:05
Default true preserves existing behavior. Lets testnet match live (false).
…porters

- New var ecs_container_insights (default "enhanced") drives containerInsights
  on aws_ecs_cluster.main in indexer + full_node/snapshot/backup validator
  modules (via new validator module var container_insights).
- New vars msk_open_monitoring_jmx_exporter_enabled and
  msk_open_monitoring_node_exporter_enabled (defaults true) drive the
  prometheus exporters on aws_msk_cluster.main.

Defaults preserve existing behavior. Lets testnet describe its live shape
(insights "enabled" instead of "enhanced", exporters disabled).
These were workflow scripts not intended for the repo.
@UnbornAztecKing UnbornAztecKing requested a review from jusbar23 June 3, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant