Skip to content

Files

Latest commit

 

History

History
61 lines (36 loc) · 1.42 KB

CONTRIBUTING.md

File metadata and controls

61 lines (36 loc) · 1.42 KB

Contributing to the Port Terraform Provider

Setting up your developer workspace:

  • Have golang installed
  • Have wget installed
  • Run make dev-setup

Verifying your contribution:

Be sure to run:

make lint

NOTE: Should be installed with make dev-setup, if you prefer manually, have a look at the installation guide.

Documentation

The resource examples are generated from the schema. This means that in order to update the examples, you will need to update the ResourceMarkdownDescription in the resource schema.go file.

In addition, when changing schema, run make gen-docs.

You can preview how the documentation will look in the Terraform registry with this tool.

Running your tests

Expose the following environment variables:

PORT_CLIENT_ID

PORT_CLIENT_SECRET

PORT_BASE_URL - Optional, Port API url

Then run:

make acctest

# or filtered for your specific test:

TEST_FILTER=.*MyCustomResource.* make acctest

Running your code as the actual terraform provider

make dev-run-integration

Then export the printed TF_REATTACH_PROVIDERS environment variable, then your terraform will use your running code.

Debugging your code with dlv

Install Delve

make dev-debug