namecheap / terraform-provider-namecheap

Terraform provider for Namecheap
Apache License 2.0
147 stars 30 forks source link

Update to Terraform Plugin SDK v2 #38

Closed robgmills closed 3 years ago

robgmills commented 3 years ago

Sorry there's so much packed in here. Normally I would have broken it up into a few smaller PRs.

Here's all this address:

All the tests pass and I think this maintains the interface (as far as I can tell).

Soooooo...this kind of fixes #34. It gets you like, 80% of the way there.

You'll still need to do all the Terraform registry and Github Actions configuration:

  1. Generate a GPG public/private keypair
  2. Add your GPG_PRIVATE_KEY and PASSPHRASE to the Github Actions environment variables.
  3. Register for an account on the Terraform Registry
  4. Upload your GPG public key to the TF registry
  5. And import your Github repository to the TF registry

I did all of the above in about an hour. The trickiest part was creating the GPG key as it was my first-ish time.

You'll note that in the README.md, it points to a release under my name: robgmills/namecheap:

terraform {
  required_providers {
    namecheap = {
      source  = "robgmills/namecheap"
      version = "1.7.0"
    }
  }
}

Publishing a release to the registry was how I managed to use it with my current version of terraform. I couldn't get the symlinking/namespacing stuff called out in #34 to work. I'd love to nuke my release if/when you release the official version on the registry. If you want me to change it to something different as part of this PR, I'm happy to do so. In the meantime I've disabled your ability to edit my fork's master branch because you could expose my GPG key and passphrase.

LMK if you need some help! I'd love to hop on a Zoom/Hangout/whatever to pair with you to get it released!

Thanks again for sharing your work!

robgmills commented 3 years ago

Oh! You'll also need to tag releases using the format v${MAJOR}.${MINOR}.${PATCH} moving forward in order for the Github Action to pick up the changes.

adamdecaf commented 3 years ago

Awesome, thanks! I can get a release out on the registry. I've been working with Namecheap for them to officially adopt this project as well.

robgmills commented 3 years ago

Oh that's cool! LMK if there's anything I can do to help make that happen!