Skip to content

Commit

Permalink
Include link to tf-applier UI in the alert (#137)
Browse files Browse the repository at this point in the history
Often the resolution is forcing a run
  • Loading branch information
george-angel authored Nov 21, 2024
1 parent 82723a3 commit 5a73089
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/stock/terraform_sync.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ groups:
alerttype: stock
alertgroup: terraform_applier_module
annotations:
summary: "Terraform module {{ $labels.module }} in {{ $labels.namespace }} encountered errors during last terraform run"
summary: "Terraform module {{ $labels.module }} in {{ $labels.namespace }} encountered an error"
description: |
Some resources may not have been applied.
to check status run following command:
Expand All @@ -23,4 +23,5 @@ groups:
If module is using kube backend and the state is locked you can remove the lock with the following command:
`kubectl --context={{ $labels.kubernetes_cluster }} -n {{ $labels.namespace }} patch lease lock-tfstate-default-{{ $labels.module }} --type=json -p='[{"op":"remove","path":"/spec/holderIdentity"}]'`
dashboard: <https://terraform-applier-system.$ENVIRONMENT.$PROVIDER.uw.systems/#{{$labels.namespace}}-{{$labels.module}}"|link>
logs: https://grafana.$ENVIRONMENT.aws.uw.systems/explore?left=["now-1h","now","Loki",{"expr":"{kubernetes_cluster=\"{{$labels.kubernetes_cluster}}\",kubernetes_namespace=\"{{$labels.kubernetes_namespace}}\"} |=\"{{$labels.module}}\""}]
logs: 'https://grafana.$ENVIRONMENT.aws.uw.systems/explore?left=["now-1h","now","Loki",{"expr":"{kubernetes_cluster=\"{{$labels.kubernetes_cluster}}\",kubernetes_namespace=\"{{$labels.kubernetes_namespace}}\"} |=\"{{$labels.module}}\""}]'
tf_applier: "https://terraform-applier-system.$ENVIRONMENT.$PROVIDER.uw.systems/"

0 comments on commit 5a73089

Please sign in to comment.