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:
Add an icon to the Terraform section of project home, with a popover explaining periods may break the state.
Implementation guide
- Update
terraform_states_anchor_dataobject to include an icon. - Add a span element with the icon to the label property of the
AnchorData. - Use the
content_taghelper to create a span and assign a classgl-ml-2, a titles_('Terraform|Support for periods (.) in Terraform state names might break existing states.')anddata: { toggle: 'tooltip' }for tooltip rendering. - Use the
sprite_iconhelper with iconerror, default size, andcss_class: 'gl-text-gray-600'. - (optional) Update the corresponding specs at
project_presenter_spec.rb
Edited by Anna Vovchenko
