Skip to content

Upsell the GitLab Managed Terraform state if the repo contains `.tf` files

What does this MR do?

This MR adds a banner to the top of the GitLab project page in such cases:

  • the repository contains .tf files - repository_languages helper that returns the top 5 repo languages is used, so HCL files (that are used most of the time for Terraform) should be in the top 5 to enable the banner.
  • there are no GitLab Managed Terraform states already used for the project.

The primary button should lead to GitLab managed Terraform State docs page. The click event on the close button should be stored in the cookies per the project to ensure that the banner won't show up again for the same user and project after being dismissed.

Screenshots or Screencasts (strongly suggested)

Screenshot_2021-07-09_at_17.57.48

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #330592 (closed)

Edited by Anna Vovchenko

Merge request reports