monitoring: adopt orphaned alert-digest resources into TF state (unblocks apply)
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>
This commit is contained in:
parent
36521839fc
commit
f4f7705127
1 changed files with 16 additions and 0 deletions
16
stacks/monitoring/imports.tf
Normal file
16
stacks/monitoring/imports.tf
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# 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"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue