Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish this module in the Terraform Registry #25

Open
10 of 23 tasks
displague opened this issue Apr 19, 2021 · 0 comments
Open
10 of 23 tasks

Publish this module in the Terraform Registry #25

displague opened this issue Apr 19, 2021 · 0 comments

Comments

@displague
Copy link
Member

displague commented Apr 19, 2021

In order to publish this module (https://www.terraform.io/docs/registry/modules/publish.html):

  • replace "Packet" with "Equinix Metal"
  • replace packet_ with metal_
  • replace other Packet references (slack, websites, email, with their EM equivalent)
  • Search for "packet" to find any stragglers
  • create versions.tf (copy it from another project and modify it, or use terraform 0.12upgrade, 0.13upgrade, etc).. Presumably, it will look something like this in the end:
    terraform {
      required_providers {
        null = {
          source = "hashicorp/null"
        }
        metal = {
          source = "equinix/metal"
        }
        random = {
          source = "hashicorp/random"
        }
        template = {
          source = "hashicorp/template"
        }
        tls = {
          source = "hashicorp/tls"
        }
        local = {
          source = "hashicorp/local"
        }
      }
      required_version = ">= 0.13"
    }
  • run terraform providers lock
  • add .terraform.lock.hcl to git (might have to change the .gitignore rules)
  • update to TF 0.14+
  • indicate sensitive = true in variables.tf (auth_token) and output.tf (kubeadm_join_command)
  • remove the circleci example test
  • replace it with https://github.com/equinix/terraform-metal-anthos-on-baremetal/blob/main/.github/workflows/terraform.yml, minimally
  • rename output.tf to outputs.tf (part of standard module structure)
  • ^ consider renaming templates to assets
  • ^ consider renaming scripts to assets/scripts
  • update documentation for the new equinix/terraform-metal-kubernetes-bgp home
  • terraform fmt
  • terraform validate
  • rename the project to terraform-metal-kubernetes-bgp (format of name is required)
  • move the project to equinix/
  • tag the release (git tag -a v0.1.0 -m v0.1.0 (or -s instead of -a) (semver is required)
  • publish https://registry.terraform.io/github/create
  • The module should be consumable without any modification of the tf files.
    # create minimal main.tf in tmpdir; add variables or hardcode settings; 
    # terraform init -upgrade; terraform apply
    module "kubernetes-bgp" {
      source  = "equinix/kubernetes-bgp/metal"
      version = "0.1.0"
      # insert the required variables here
    }
  • Documentation should be updated to note how the project may be consumed as a module (consider if any other output variables should be made available)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant