From 9587c6383c37be894f6ca5a8d8f3edbb1826c219 Mon Sep 17 00:00:00 2001 From: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Date: Thu, 1 Jun 2023 07:48:41 -0400 Subject: [PATCH] chore(doc): project documentation update (#356) --- CONTRIBUTING.md | 39 ++++++++++++++++++++++++++++++++++++--- README.md | 1 - docs/index.md | 31 ++++++++++++++++--------------- 3 files changed, 52 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c5539b2..60a7d2b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,13 +19,46 @@ existing ones in order to target your changes. You can run all the test cases by invoking `make test`. +## Coding conventions + +We expect that all code contributions have been formatted using `gofmt`. You can +run `make fmt` to format your code. + +We also expect that all code contributions have been linted +using `golangci-lint`. +You can run `make lint` to lint your code. + +## Commit message conventions + +We expect that all commit messages follow the +[Conventional Commits](https://www.conventionalcommits.org/) specification. + +Please use the `scope` field to indicate the area of the codebase that is being +changed. For example, `vm` for changes in the Virtual Machine resource, or +`lcx` for changes in the Container resource: + +``` +feat(vm): add support for the `clone` operation +``` + ## Submitting changes Please create a new PR against the `main` branch which must be based on the project's [pull request template](.github/PULL_REQUEST_TEMPLATE.md). -Please follow the [Conventional Commits](https://www.conventionalcommits.org/) specification when naming your commits and/or PRs. +We usually squash all PRs commits on merge, and use the PR title as the commit +message. Therefore, the PR title should follow the +[Conventional Commits](https://www.conventionalcommits.org/) specification as +well. -## Coding conventions +## Releasing -We expect that all code contributions have been formatted using `gofmt`. +We use automated release management orchestrated +by https://github.com/googleapis/release-please GitHub Action. The action +creates a new release PR with the changelog and bumps the version based on the +commit messages. The release PR is merged by the maintainers. + +The release will be published to the GitHub Releases page and the Terraform +Registry. + +We aim to release a new version every 1-2 weeks. diff --git a/README.md b/README.md index 887c58a7..8cecd7ef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Terraform Provider for Proxmox [![Go Report Card](https://goreportcard.com/badge/github.com/bpg/terraform-provider-proxmox)](https://goreportcard.com/report/github.com/bpg/terraform-provider-proxmox) -[![codecov](https://codecov.io/github/bpg/terraform-provider-proxmox/branch/main/graph/badge.svg?token=RTSCyU0qyN)](https://codecov.io/github/bpg/terraform-provider-proxmox) [![GoDoc](https://godoc.org/github.com/bpg/terraform-provider-proxmox?status.svg)](http://godoc.org/github.com/bpg/terraform-provider-proxmox) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/bpg/terraform-provider-proxmox)](https://github.com/bpg/terraform-provider-proxmox/releases/latest) [![GitHub Release Date](https://img.shields.io/github/release-date/bpg/terraform-provider-proxmox)](https://github.com/bpg/terraform-provider-proxmox/releases/latest) diff --git a/docs/index.md b/docs/index.md index 119d82bc..6b329bd5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -95,12 +95,13 @@ target node using the credentials provided in the `username` and `password` fields. Note that the target node is identified by the `node` argument in the resource, and may be different from the Proxmox API endpoint. Please refer to the -section below for all the available arguments in the `ssh` block. +"Argument Reference" section below for all the available arguments in the `ssh` +block. #### Node IP address used for SSH connection In order to make the SSH connection, the provider needs to know the IP address -of the node specified in the resource. The provider will attempt to resolve the +of the target node. The provider will attempt to resolve the node name to an IP address using Proxmox API to enumerate the node network interfaces, and use the first one that is not a loopback interface. In some cases this may not be the desired behavior, for example when the node has @@ -108,20 +109,21 @@ multiple network interfaces, and the one that should be used for SSH is not the first one. To override the node IP address used for SSH connection, you can use the -optional -`node` blocks in the `ssh` block. For example: +optional `node` blocks in the `ssh` block. For example: ```terraform +provider "proxmox" { + // ... ssh { - agent = true - username = "root" - node { - name = "pve1" - address = "192.168.10.1" - } - node { - name = "pve2" - address = "192.168.10.2" + // ... + node { + name = "pve1" + address = "192.168.10.1" + } + node { + name = "pve2" + address = "192.168.10.2" + } } } @@ -138,8 +140,7 @@ To create an API Token, log in to the Proxmox web interface, and navigate to token. You can then use the `api_token` field in the `provider` block to provide the token. `api_token` can also be sourced from `PROXMOX_VE_API_TOKEN` environment variable. The token authentication is taking precedence over the -password authentication, so you can still provide the username / password to be -used as a fallback. +password authentication. ```terraform provider "proxmox" {