Skip to content
Snippets Groups Projects

Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

Merged Timo Furrer requested to merge terraform-module-ci-template into master
All threads resolved!

What does this MR do and why?

This change set introduces a new CI/CD template named Terraform-Module.gitlab-ci.yml which can be used to easily deploy a Terraform Module to the GitLab Terraform Registry.

Prior to this change the documentation contained a pipeline snippet which could be used to achieve the same. This is a little cumbersome for users though and it would be nice if that snippet would just exist as a template - that's what this MR does ;)

The template comes as a pipeline and job template which makes it easy to adapt to more complex use-cases like deploying multiple Terraform Modules from the same pipeline.

This change set also contains the relevant new template metrics and specs for the new templates.

Screenshots or screen recordings

Aspect Reference
New template can be selected in UI image
Regular branch pipeline https://gitlab.com/timofurrer/terraform-pet-site-module-template/-/pipelines/761336962
Tag pipeline https://gitlab.com/timofurrer/terraform-pet-site-module-template/-/pipelines/761337414

How to set up and validate locally

  1. Create a new project
  2. Create a new .gitlab-ci.yml using WebIDE
  3. Create from Terraform-Module template
  4. Run branch pipelines and verify
  5. Run tag pipelines and verify

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Timo Furrer

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ghost User
  • Ghost User
  • Ghost User
  • Ghost User
    • Resolved by Hordur Freyr Yngvason
      2 Warnings
      :warning: e798123a: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines.
      :warning:

      For the following files, a review from the Data team and Product Intelligence team is recommended
      Please check the product intelligence Service Ping guide or the Snowplow guide.

      For MR review guidelines, see the Service Ping review guidelines or the Snowplow review guidelines.

      • config/metrics/counts_28d/20230130074932_p_ci_templates_terraform_module_monthly.yml
      • config/metrics/counts_28d/20230130075614_p_ci_templates_terraform_module_base_monthly.yml
      • config/metrics/counts_7d/20230130074931_p_ci_templates_terraform_module_weekly.yml
      • config/metrics/counts_7d/20230130075613_p_ci_templates_terraform_module_base_weekly.yml
      • config/metrics/counts_28d/20210216184559_ci_templates_total_unique_counts_monthly.yml
      • config/metrics/counts_7d/20210216184557_ci_templates_total_unique_counts_weekly.yml
      • lib/gitlab/usage_data_counters/known_events/ci_templates.yml
      2 Messages
      :book: This merge request adds or changes files that require a review from the CI/CD Templates maintainers.
      :book: This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge.

      This merge request requires a CI/CD Template review. To make sure these changes are reviewed, take the following steps:

      1. Ensure the merge request has the citemplates label. If the merge request modifies CI/CD Template files, Danger will do this for you.
      2. Prepare your MR for a CI/CD Template review according to the template development guide.
      3. Assign and @ mention the CI/CD Template reviewer suggested by Reviewer Roulette.

      The following files require a review from the CI/CD Templates maintainers:

      • lib/gitlab/ci/templates/Terraform/Module-Base.gitlab-ci.yml
      • lib/gitlab/ci/templates/Terraform-Module.gitlab-ci.yml

      Documentation review

      The following files require a review from a technical writer:

      The review does not need to block merging this merge request. See the:

      Reviewer roulette

      Changes that require review have been detected!

      Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

      Category Reviewer Maintainer
      backend Gregory Havenga current availability (@ghavenga) (UTC+2, 1 hour ahead of @timofurrer) Matthias Käppler current availability (@mkaeppler) (UTC+1, same timezone as @timofurrer)
      citemplates Sean Arnold current availability (@seanarnold) (UTC+13, 12 hours ahead of @timofurrer) Lucas Charles current availability (@theoretick) (UTC-8, 9 hours behind @timofurrer)
      product intelligence Piotr Skorupa current availability (@pskorupa) (UTC+1, same timezone as @timofurrer) Maintainer review is optional for product intelligence

      To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

      To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

      Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

      If needed, you can retry the :repeat: danger-review job that generated this comment.

      Generated by :no_entry_sign: Danger

  • Timo Furrer changed the description

    changed the description

  • Timo Furrer added 1 commit

    added 1 commit

    • 622cd8e7 - Apply 5 suggestion(s) to 5 file(s)

    Compare with previous version

  • 🤖 GitLab Bot 🤖 resolved all threads

    resolved all threads

  • Timo Furrer mentioned in commit 24b56ec3

    mentioned in commit 24b56ec3

  • Timo Furrer added 2 commits

    added 2 commits

    • 0abd877c - Add metrics for new Terraform-Module ci templates
    • 24b56ec3 - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • Timo Furrer changed the description

    changed the description

  • Timo Furrer
  • Timo Furrer
  • Timo Furrer
  • Timo Furrer
  • Timo Furrer resolved all threads

    resolved all threads

  • Timo Furrer resolved all threads

    resolved all threads

  • Timo Furrer resolved all threads

    resolved all threads

  • Timo Furrer added 1 commit

    added 1 commit

    • 63a871e5 - Apply 4 suggestion(s) to 4 file(s)

    Compare with previous version

  • Timo Furrer mentioned in commit b0da79eb

    mentioned in commit b0da79eb

  • Timo Furrer added 2 commits

    added 2 commits

    • 1c34aba2 - Add metrics for new Terraform-Module ci templates
    • b0da79eb - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer marked this merge request as ready

    marked this merge request as ready

  • Abdul Wadood requested review from @abdwdd, @seanarnold, and @michold

    requested review from @abdwdd, @seanarnold, and @michold

  • Abdul Wadood approved this merge request

    approved this merge request

  • Abdul Wadood requested review from @tigerwnz and @phillipwells and removed review request for @abdwdd

    requested review from @tigerwnz and @phillipwells and removed review request for @abdwdd

  • :wave: @abdwdd, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • Phillip Wells changed milestone to %15.9

    changed milestone to %15.9

  • Sean Arnold approved this merge request

    approved this merge request

  • Tiger Watson
  • Tiger Watson removed review request for @tigerwnz

    removed review request for @tigerwnz

  • Timo Furrer added 1 commit

    added 1 commit

    • 1762bbdf - Apply 5 suggestion(s) to 1 file(s)

    Compare with previous version

  • Timo Furrer mentioned in commit f4b9665f

    mentioned in commit f4b9665f

  • Timo Furrer added 1 commit

    added 1 commit

    • f4b9665f - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer mentioned in commit 61bea1d8

    mentioned in commit 61bea1d8

  • Timo Furrer added 1 commit

    added 1 commit

    • 61bea1d8 - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer
  • mentioned in merge request !66924 (closed)

  • Timo Furrer mentioned in commit 4d9582b6

    mentioned in commit 4d9582b6

  • Timo Furrer added 2 commits

    added 2 commits

    • bfc37fd3 - Add metrics for new Terraform-Module ci templates
    • 4d9582b6 - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer mentioned in commit 9fcafc61

    mentioned in commit 9fcafc61

  • Timo Furrer added 224 commits

    added 224 commits

    • 4d9582b6...7c46dd1f - 222 commits from branch master
    • c8098e8c - Add metrics for new Terraform-Module ci templates
    • 9fcafc61 - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer
  • Author Maintainer

    Can anyone help me with the spec failures?

    Edited by Timo Furrer
  • Timo Furrer mentioned in commit 1b9c80dc

    mentioned in commit 1b9c80dc

  • Timo Furrer added 1 commit

    added 1 commit

    • 1b9c80dc - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer mentioned in commit cabca64f

    mentioned in commit cabca64f

  • Timo Furrer added 2 commits

    added 2 commits

    • 1f645e0f - Add metrics for new Terraform-Module ci templates
    • cabca64f - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Timo Furrer mentioned in commit 4eebf104

    mentioned in commit 4eebf104

  • Timo Furrer added 2 commits

    added 2 commits

    • ef138bc1 - Add metrics for new Terraform-Module ci templates
    • 4eebf104 - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

    Compare with previous version

  • Phillip Wells approved this merge request

    approved this merge request

  • Phillip Wells removed review request for @phillipwells

    removed review request for @phillipwells

  • Tiger Watson added 1 commit

    added 1 commit

    • 0124b3cd - Manually update known_events/ci_templates.yaml

    Compare with previous version

  • Sean Arnold removed review request for @seanarnold

    removed review request for @seanarnold

  • Sean Arnold approved this merge request

    approved this merge request

  • Tiger Watson requested review from @pskorupa

    requested review from @pskorupa

  • Michał Wielich removed review request for @pskorupa

    removed review request for @pskorupa

  • Timo Furrer mentioned in commit ece7aec6

    mentioned in commit ece7aec6

  • Michał Wielich added 368 commits

    added 368 commits

    • 0124b3cd...edde6971 - 365 commits from branch master
    • 2c133b3f - Add metrics for new Terraform-Module ci templates
    • ece7aec6 - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template
    • c907fc02 - Manually update known_events/ci_templates.yaml

    Compare with previous version

  • Michał Wielich removed review request for @michold

    removed review request for @michold

  • Clayton Cornell approved this merge request

    approved this merge request

  • Timo Furrer requested review from @hfyngvason

    requested review from @hfyngvason

  • Hordur Freyr Yngvason
  • Thanks @timofurrer! This looks great! Just one small question from me. Let me know what you think :ping_pong:

  • Hordur Freyr Yngvason removed review request for @hfyngvason

    removed review request for @hfyngvason

  • Timo Furrer mentioned in commit 939ff82b

    mentioned in commit 939ff82b

  • Timo Furrer added 188 commits

    added 188 commits

    • c907fc02...47a9ca14 - 184 commits from branch master
    • e798123a - Add metrics for new Terraform-Module ci templates
    • 939ff82b - Add new `Terraform-Module.gitlab-ci.yml` CI/CD template
    • c1a7afdb - Manually update known_events/ci_templates.yaml
    • 8055401e - Use terraform-images for Terraform Module CI/CD template

    Compare with previous version

  • mentioned in issue terraform-images#100

  • Hordur Freyr Yngvason approved this merge request

    approved this merge request

  • Hordur Freyr Yngvason resolved all threads

    resolved all threads

  • requested review from @michold

  • Michał Wielich approved this merge request

    approved this merge request

  • Michał Wielich removed review request for @michold

    removed review request for @michold

  • Michał Wielich requested review from @hfyngvason

    requested review from @hfyngvason

  • Hordur Freyr Yngvason resolved all threads

    resolved all threads

  • @hfyngvason, did you forget to run a pipeline before you merged this work? Based on our code review process, if the latest pipeline was created more than 6 hours ago, and finished more than 2 hours ago, you should:

    1. Ensure the merge request is not in Draft status.
    2. Start a pipeline (especially important for Community contribution merge requests).
    3. Set the merge request to merge when pipeline succeeds.

    This is a guideline, not a rule. Please consider replying to this comment for transparency.

    This message was generated automatically. You're welcome to improve it.

  • Timo Furrer mentioned in commit 13dd2db7

    mentioned in commit 13dd2db7

  • mentioned in commit 93c605c7

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading