0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-03 20:12: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
title: Alias
permalink: /data-sources/virtual-environment/alias
permalink: /data-sources/alias
nav_order: 1
parent: Virtual Environment Data Sources
parent: Data Sources
---
# Data Source: Alias

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,9 @@
---
layout: page
title: Version
permalink: /data-sources/virtual-environment/version
nav_order: 14
parent: Virtual Environment Data Sources
grand_parent: Data Sources
permalink: /data-sources/version
nav_order: 16
parent: Data Sources
---
# 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
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
title: Alias
permalink: /ressources/virtual-environment/alias
permalink: /ressources/alias
nav_order: 1
parent: Virtual Environment Resources
grand_parent: Resources
parent: Resources
---
# Resource: Alias

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,9 @@
---
layout: page
title: User
permalink: /ressources/virtual-environment/user
nav_order: 10
parent: Virtual Environment Resources
grand_parent: Resources
permalink: /resources/user
nav_order: 12
parent: Resources
---
# 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
title: VM
permalink: /ressources/virtual-environment/vm
nav_order: 11
parent: Virtual Environment Resources
grand_parent: Resources
permalink: /resources/vm
nav_order: 13
parent: Resources
---
# Resource: VM