The monitoring stack apply was create-failing on every push with `configmaps
"alert-digest-script" already exists` + `secrets "alert-digest" already exists`
(modules/monitoring/alert_digest.tf) — both resources exist in-cluster but fell
out of Terraform state, so apply tried to CREATE them and errored. Pre-existing
(failed on pipelines 203 AND 204, NOT caused by the t3 alert-rules change). Add
import {} blocks (TF 1.5+ adoption per AGENTS.md) so apply imports + reconciles
instead of failing. Idempotent once imported; safe to remove after a green apply.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
16 lines
786 B
HCL
16 lines
786 B
HCL
# One-shot adoption of two alert-digest resources that exist in-cluster but fell
|
|
# out of Terraform state — the monitoring apply was create-failing on every push
|
|
# with `configmaps "alert-digest-script" already exists` and `secrets
|
|
# "alert-digest" already exists` (pre-existing: pipelines 203 AND 204). Importing
|
|
# reconciles them into state so `terraform apply` UPDATES instead of failing to
|
|
# create. These blocks are idempotent (a no-op once the resources are in state)
|
|
# and may be removed after the next green apply. Defs: modules/monitoring/alert_digest.tf.
|
|
import {
|
|
to = module.monitoring.kubernetes_config_map.alert_digest_script
|
|
id = "monitoring/alert-digest-script"
|
|
}
|
|
|
|
import {
|
|
to = module.monitoring.kubernetes_secret.alert_digest
|
|
id = "monitoring/alert-digest"
|
|
}
|