Add an alert to warn users about using a period in a Terraform state name

Context

We now have 2 situations that could be warned about:

On GitLab.com (ff is enabled) and self-managed which chose to enable it manually

  • Periods are already allowed, as the FF is enabled.
  • If they were trying to use periods before with -lock=false, then they'll probably see a deploy failure on their terraform job. As a new state will be created with the period, that will diverge from the previous state that got the period truncated.

For these cases, the best would probably be to point them to the new troubleshooting section.

Self-managed with ff disabled

The best would probably be to point them to the deprecations page for 15.7.

Proposal

Add an alert for the users for both situations. As we don't expect many users to visit the terraform state page, the alert can be added to the project's main view page. As it is not trivial to detect if the state name contains a period, we can show the dismissable alert to all users who have Terraform states.

Screenshot_2023-01-27_at_13.32.46

For more context see the related discussion.

Implementation Guide

This feature needs 2 separate MRs in 2 milestones to be implemented.

  1. Add a feature id to the callouts list
  2. Add an alert based on the condition project.terraform_states.exists?
Edited by Anna Vovchenko