0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-04 04:22:59 +00:00

Merge remote-tracking branch 'blz-ea/feature-terraform-registry' into release-0.4.0

This commit is contained in:
Dan Petersen 2021-01-02 23:13:24 +01:00
commit 7de58a2df0
36 changed files with 187 additions and 150 deletions

47
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,47 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (paultyng/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Import GPG key
id: import_gpg
uses: paultyng/ghaction-import-gpg@v2.1.0
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

54
.goreleaser.yml Normal file
View File

@ -0,0 +1,54 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
- go mod tidy
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
# if you are using this is a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true

View File

@ -1,9 +1,9 @@
--- ---
layout: page layout: page
title: Alias title: Alias
permalink: /data-sources/virtual-environment/alias permalink: /data-sources/alias
nav_order: 1 nav_order: 1
parent: Virtual Environment Data Sources parent: Data Sources
--- ---
# Data Source: Alias # Data Source: Alias

View File

@ -1,9 +1,8 @@
--- ---
layout: page layout: page
title: Aliases title: Aliases
permalink: /data-sources/virtual-environment/aliases permalink: /data-sources/aliases
nav_order: 1 nav_order: 2
parent: Virtual Environment Data Sources
parent: Data Sources parent: Data Sources
--- ---

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Datastores title: Datastores
permalink: /data-sources/virtual-environment/datastores permalink: /data-sources/datastores
nav_order: 1 nav_order: 3
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Datastores # Data Source: Datastores

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: DNS title: DNS
permalink: /data-sources/virtual-environment/dns permalink: /data-sources/dns
nav_order: 2 nav_order: 4
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: DNS # Data Source: DNS

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Group title: Group
permalink: /data-sources/virtual-environment/group permalink: /data-sources/group
nav_order: 3 nav_order: 5
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Group # Data Source: Group

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Groups title: Groups
permalink: /data-sources/virtual-environment/groups permalink: /data-sources/groups
nav_order: 4 nav_order: 6
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Groups # Data Source: Groups

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Hosts title: Hosts
permalink: /data-sources/virtual-environment/hosts permalink: /data-sources/hosts
nav_order: 5 nav_order: 7
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Hosts # Data Source: Hosts

View File

@ -2,7 +2,7 @@
layout: page layout: page
title: Data Sources title: Data Sources
permalink: /data-sources permalink: /data-sources
nav_order: 2 nav_order: 3
has_children: true has_children: true
--- ---

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Nodes title: Nodes
permalink: /data-sources/virtual-environment/nodes permalink: /data-sources/nodes
nav_order: 6 nav_order: 8
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Nodes # Data Source: Nodes

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Pool title: Pool
permalink: /data-sources/virtual-environment/pool permalink: /data-sources/pool
nav_order: 7 nav_order: 9
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Pool # Data Source: Pool

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Pools title: Pools
permalink: /data-sources/virtual-environment/pools permalink: /data-sources/pools
nav_order: 8 nav_order: 10
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Pools # Data Source: Pools

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Role title: Role
permalink: /data-sources/virtual-environment/role permalink: /data-sources/role
nav_order: 9 nav_order: 11
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Role # Data Source: Role

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Roles title: Roles
permalink: /data-sources/virtual-environment/roles permalink: /data-sources/roles
nav_order: 10 nav_order: 12
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Roles # Data Source: Roles

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Time title: Time
permalink: /data-sources/virtual-environment/time permalink: /data-sources/time
nav_order: 11 nav_order: 13
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Time # Data Source: Time

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: User title: User
permalink: /data-sources/virtual-environment/user permalink: /data-sources/user
nav_order: 12 nav_order: 14
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: User # Data Source: User

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Users title: Users
permalink: /data-sources/virtual-environment/users permalink: /data-sources/users
nav_order: 13 nav_order: 15
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Users # Data Source: Users

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Version title: Version
permalink: /data-sources/virtual-environment/version permalink: /data-sources/version
nav_order: 14 nav_order: 16
parent: Virtual Environment Data Sources parent: Data Sources
grand_parent: Data Sources
--- ---
# Data Source: Version # Data Source: Version

View File

@ -1,10 +0,0 @@
---
layout: page
title: Virtual Environment Data Sources
permalink: /data-sources/virtual-environment
nav_order: 1
parent: Data Sources
has_children: true
---
# Virtual Environment Data Sources

View File

@ -23,22 +23,6 @@ provider "proxmox" {
} }
``` ```
## Installation
You can install the latest release of the provider using either Git Bash or regular Bash:
```sh
$ export PROVIDER_PLATFORM="$([[ "$OSTYPE" =~ ^msys|cygwin$ ]] && echo "windows" || ([[ "$OSTYPE" == "darwin"* ]] && echo "darwin" || ([[ "$OSTYPE" == "linux"* ]] && echo "linux" || echo "unsupported")))"
$ export PROVIDER_VERSION="$(curl -L -s -H 'Accept: application/json' https://github.com/danitso/terraform-provider-proxmox/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')"
$ export PLUGINS_PATH="$([[ "$PROVIDER_PLATFORM" == "windows" ]] && cygpath -u "$APPDATA" || echo "$HOME")/terraform.d/plugins"
$ mkdir -p "$PLUGINS_PATH"
$ curl -o "${PLUGINS_PATH}/terraform-provider-proxmox_v${PROVIDER_VERSION}.zip" -sL "https://github.com/danitso/terraform-provider-proxmox/releases/download/${PROVIDER_VERSION}/terraform-provider-proxmox_v${PROVIDER_VERSION}-custom_${PROVIDER_PLATFORM}_amd64.zip"
$ unzip -o -d "$PLUGINS_PATH" "${PLUGINS_PATH}/terraform-provider-proxmox_v${PROVIDER_VERSION}.zip"
$ rm "${PLUGINS_PATH}/terraform-provider-proxmox_v${PROVIDER_VERSION}.zip"
```
You can also install it manually by following the instructions to [install it as a plugin](https://www.terraform.io/docs/plugins/basics.html#installing-plugins). You can download the latest release from the [releases](https://github.com/danitso/terraform-provider-proxmox/releases) page.
## Authentication ## Authentication
The Proxmox provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below: The Proxmox provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Alias title: Alias
permalink: /ressources/virtual-environment/alias permalink: /ressources/alias
nav_order: 1 nav_order: 1
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Alias # Resource: Alias

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Certificate title: Certificate
permalink: /ressources/virtual-environment/certificate permalink: /resources/certificate
nav_order: 1 nav_order: 2
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Certificate # Resource: Certificate

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Container title: Container
permalink: /ressources/virtual-environment/container permalink: /resources/container
nav_order: 2 nav_order: 3
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Container # Resource: Container

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: DNS title: DNS
permalink: /ressources/virtual-environment/dns permalink: /resources/dns
nav_order: 3 nav_order: 4
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: DNS # Resource: DNS

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: File title: File
permalink: /ressources/virtual-environment/file permalink: /resources/file
nav_order: 4 nav_order: 5
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: File # Resource: File

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Group title: Group
permalink: /ressources/virtual-environment/group permalink: /resources/group
nav_order: 5 nav_order: 6
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Group # Resource: Group

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Hosts title: Hosts
permalink: /ressources/virtual-environment/hosts permalink: /resources/hosts
nav_order: 6 nav_order: 7
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Hosts # Resource: Hosts

View File

@ -2,7 +2,7 @@
layout: page layout: page
title: Resources title: Resources
permalink: /resources permalink: /resources
nav_order: 3 nav_order: 2
has_children: true has_children: true
--- ---

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: IPSet title: IPSet
permalink: /ressources/virtual-environment/ipset permalink: /ressources/ipset
nav_order: 12 nav_order: 8
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: IPSet # Resource: IPSet

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Pool title: Pool
permalink: /ressources/virtual-environment/pool permalink: /resources/pool
nav_order: 7 nav_order: 9
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Pool # Resource: Pool

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Role title: Role
permalink: /ressources/virtual-environment/role permalink: /resources/role
nav_order: 8 nav_order: 10
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Role # Resource: Role

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: Time title: Time
permalink: /ressources/virtual-environment/time permalink: /resources/time
nav_order: 9 nav_order: 11
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: Time # Resource: Time

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: User title: User
permalink: /ressources/virtual-environment/user permalink: /resources/user
nav_order: 10 nav_order: 12
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: User # Resource: User

View File

@ -1,10 +0,0 @@
---
layout: page
title: Virtual Environment Resources
permalink: /resources/virtual-environment
nav_order: 1
parent: Resources
has_children: true
---
# Virtual Environment Resources

View File

@ -1,10 +1,9 @@
--- ---
layout: page layout: page
title: VM title: VM
permalink: /ressources/virtual-environment/vm permalink: /resources/vm
nav_order: 11 nav_order: 13
parent: Virtual Environment Resources parent: Resources
grand_parent: Resources
--- ---
# Resource: VM # Resource: VM