Add an icon to project home to warn users about using a period in a Terraform state name

Purpose

A follow up from: Add alert to warn users about using a period in... (!152686 - merged)

As part of this MR, it was decided to move away from adding an alert to the project home to avoid banner overload was the best way forward. The MR pivoted to add the alert to the Terraform State Page - but this page is rarely visited. What we can do is add an icon the the Terraform section of the project home to prompt users to investigate:

More context on the original issue here: Add an alert to warn users about using a period... (#389548 - closed)

Solution:

Screenshot_2024-05-16_at_1.37.15_PM

Add an icon to the Terraform section of project home, with a popover explaining periods may break the state.

Implementation guide

  1. Update terraform_states_anchor_data object to include an icon.
  2. Add a span element with the icon to the label property of the AnchorData.
  3. Use the content_tag helper to create a span and assign a class gl-ml-2, a title s_('Terraform|Support for periods (.) in Terraform state names might break existing states.') and data: { toggle: 'tooltip' } for tooltip rendering.
  4. Use the sprite_icon helper with icon error, default size, and css_class: 'gl-text-gray-600'.
  5. (optional) Update the corresponding specs at project_presenter_spec.rb
Edited by Anna Vovchenko