hashicorp / terraform-provider-scaffolding-framework

Quick start repository for creating a Terraform provider using terraform-plugin-framework
Mozilla Public License 2.0
286 stars 137 forks source link

Enhancements to the Dev Experience #234

Open abigailpham opened 1 month ago

abigailpham commented 1 month ago

Hi there! :) Recently my team was working on a project to build out a custom TF provider. We used a setup which included a dev container, Taskfile, and other toolings to help streamline the development experience and keep things consistent between contributors.

We would love to contribute the (generalized) template Taskfile.yml and/or devcontainer.json configuration, etc. to help others get started quickly on developing their own TF provider. For example, a typical workflow with this setup would look like this:

  1. Open the repo in VS Code inside the dev container, which will automatically install all the necessary tools and dependencies.
  2. Make changes to provider code.
  3. Run task build to build the provider binary using GoReleaser.
  4. Run task test to run unit/acceptance tests.
  5. When testing an example Terraform configuration, run task tfp to run terraform plan, and task tfa to run terraform apply with auto-approval.
  6. If all of the testing results look good, run task lint to check for linting errors or security concerns using the variety of linters set up through the dev container.
  7. Run task docs to automatically generate documentation for the provider using tfplugindocs.
  8. Commit to feature branch, and open PR.

I wanted to submit an issue here first to see if it was of interest before opening a PR or anything. Thanks!

austinvalle commented 1 month ago

Hi there @abigailpham 👋🏻, thanks for submitting an issue first!

Currently, this scaffolding provider is meant to be a baseline for Terraform provider development across the entire ecosystem. There are already a couple pieces of this repo that lean into specific workflows, such as our GitHub actions based release process, which was deemed a reasonable addition since the repo itself is housed in GitHub and the most likely use-case would be cloning it as a template repository.

That being said, I think we'd prefer to hold off on introducing more specific developer workflows to this scaffolding repo.

There has been some internal chatter about having more prescriptive provider development content for use-cases such as private provider development, so perhaps in the future we might maintain a more "curated" provider scaffold template and we can revisit this issue.

I'm going to leave this issue open to collect any other ideas the community has for this.