FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

add template for publishing terraform modules

Closed Dr Rich Wareham requested to merge terraform-registry-publish into master
1 unresolved thread

GitLab >14.0 has a terraform registry built in. Add a template which allows publishing tagged versions.

Merge request reports

Requires 1 approval from eligible users.

Closed by Dr Rich WarehamDr Rich Wareham 1 year ago (Aug 3, 2023 11:33am UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 # Publishing terraform modules in the GitLab terraform registry.
2 #
3 # This comment should be read alongside the GitLab documentation at
4 # https://docs.gitlab.com/ee/user/packages/terraform_module_registry/.
5 #
6 # The .terraform_module_publish job provides a templated job which can be used
7 # to publish a terraform module to the GitLab registry.
  • If gitlab projects have gone to the effort of adding this template via include then why not add the real task for them with default settings that they can override if needed, rather than each 'using' project having to extend .terraform_module_publish?

    Could always leave the .terraform_module_publish templated job and extend it here so if somehow they are trying to publish more than a single module they can still extend it.

    e.g. Add here:

    publish_module:
      extends: .terraform_module_publish
      stage: publish
      variables:
        TERRAFORM_MODULE_SYSTEM: google

    Then the 'using' project, can just include if nothing needs changing, or add customisation with:

    # include not shown but done above
    publish_module:
      variables:
        TERRAFORM_MODULE_SYSTEM: another
        TERRAFORM_MODULE_NAME: custom-name
  • Please register or sign in to reply
  • changed milestone to %DevOps Sprint 128

  • Dr Abraham Martin requested review from @rjg21

    requested review from @rjg21

  • changed milestone to %DevOps Sprint 129

  • changed milestone to %DevOps Sprint 130

  • changed milestone to %DevOps Sprint 131

  • changed milestone to %DevOps Sprint 132

  • changed milestone to %DevOps Sprint 133

  • changed milestone to %DevOps Sprint 134

  • changed milestone to %DevOps Sprint 135

  • Closing in favour of !59 (merged).

  • Please register or sign in to reply
    Loading