Skip to content

Latest commit

 

History

History

contributing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Contributing to the Morpheus Terraform Provider

This directory contains documentation about the Morpheus Terraform Provider codebase, aimed at readers who are interested in making code contributions.

To learn more about how to create issues and pull requests in this repository, and what happens after they are created, you may refer to the resources below:

Requirements

Getting started

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.20+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to our $PATH.

Developing the SDK

While working on the provider, you may also be working on the morpheus-go-sdk, which can be found at $GOPATH/src/github.com/gomorpheus/morpheus-go-sdk.

Building the Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using make dev. This will place the provider onto your system in a Terraform 0.13-compliant manner.

You'll need to ensure that your Terraform file contains the information necessary to find the plugin when running terraform init. make dev will use a version number of 0.0.1, so the following block will work:

terraform {
  required_providers {
    morpheus = {
      source = "localhost/providers/morpheus"
      version = "0.0.1"
    }
  }
}

Testing the Provider

In order to run the full suite of Acceptance tests, run make testacc.

Note: Acceptance tests create real resources, and often cost money to run. Please read Writing Acceptance Tests in the contribution guidelines for more information on usage.

$ make testacc

Generating Docs

To generate or update documentation, run make gendocs.

$ make gendocs

Checklists

The following checklists are meant to be used for PRs to give developers and reviewers confidence that the proper changes have been made: