Skip to content

Commit 2e564eb

Browse files
committed
Update project from boilerplate. Bump version to v2.0.0. Bump terraform-provider-xenorchestra to v0.31.0
! Breaking changes: remove deprecated resources, types and functions
1 parent 32593b3 commit 2e564eb

File tree

118 files changed

+1666
-12088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1666
-12088
lines changed

.ci-mgmt.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ upstream-provider-repo: terraform-provider-xenorchestra
1313

1414
# major version of the current provider - used in make files
1515
# This should always be set by all providers as this is key to go module paths.
16-
major-version: 1
16+
major-version: 2
1717

1818
# Enable using the terraform converter for example generation.
1919
pulumiConvert: 1

.github/workflows/build_provider.yml

+22
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ jobs:
4545
uses: ./.github/actions/setup-tools
4646
with:
4747
tools: pulumictl, go
48+
# use per-platform/arch caches instead since we are doing cross-builds
49+
cache-go: false
50+
# Based on https://github.com/actions/cache/blob/main/examples.md#go---modules
51+
- name: Get GOCACHE
52+
id: gocache
53+
shell: bash
54+
run: |
55+
echo "path=$(go env GOCACHE)" >> "${GITHUB_OUTPUT}"
56+
- name: Get GOMODCACHE
57+
id: gomodcache
58+
shell: bash
59+
run: |
60+
echo "path=$(go env GOMODCACHE)" >> "${GITHUB_OUTPUT}"
61+
- name: Go Cache
62+
uses: actions/cache@v4
63+
with:
64+
path: |
65+
${{ steps.gocache.outputs.path }}
66+
${{ steps.gomodcache.outputs.path }}
67+
key: go-provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}-${{ hashFiles('provider/go.sum') }}
68+
restore-keys: |
69+
go-provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}-
4870
- name: Prepare local workspace before restoring previously built
4971
run: make prepare_local_workspace
5072
- name: Restore prerequisites

.github/workflows/build_sdk.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
persist-credentials: false
4949
- name: Cache examples generation
50-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
50+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
5151
with:
5252
path: |
5353
.pulumi/examples-cache

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
continue-on-error: true
4949
run: make prepare_local_workspace
5050
- name: golangci-lint
51-
uses: golangci/golangci-lint-action@2e788936b09dd82dc280e845628a40d2ba6b204c # v6
51+
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6
5252
with:
5353
version: v1.60
5454
working-directory: provider

.github/workflows/prerequisites.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
- uses: pulumi/provider-version-action@f96d032a2758fdda7939e5728eff6c0d980ae894 # v1.6.0
5252
id: provider-version
5353
with:
54-
major-version: 1
54+
major-version: 2
5555
set-env: 'PROVIDER_VERSION'
5656
- name: Cache examples generation
57-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
57+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
5858
with:
5959
path: |
6060
.pulumi/examples-cache

.github/workflows/publish.yml

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
uses: ./.github/actions/setup-tools
5858
with:
5959
tools: pulumictl, pulumicli, go, schema-tools
60+
cache-go: false
6061
- name: Create dist directory
6162
run: mkdir -p dist
6263
- name: Download provider assets

.github/workflows/run-acceptance-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
if: github.event_name == 'repository_dispatch' ||
4040
github.event.pull_request.head.repo.full_name == github.repository
4141
permissions:
42+
contents: read
4243
pull-requests: write
4344
uses: ./.github/workflows/prerequisites.yml
4445
secrets: inherit

.github/workflows/upgrade-bridge.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
tools: pulumictl, pulumicli, go, nodejs, python
7575
- name: Call upgrade provider action
7676
if: github.event_name == 'workflow_dispatch'
77-
uses: pulumi/pulumi-upgrade-provider-action@a1d9f03fbfd923f787427c1d9e99c2356711d483 # v0.0.13
77+
uses: pulumi/pulumi-upgrade-provider-action@ff5cb5907aecba099e61146c4d4d074c7fd6ca99 # v0.0.15
7878
with:
7979
kind: ${{ inputs.kind }}
8080
@@ -87,7 +87,7 @@ jobs:
8787
pr-title-prefix: ${{ inputs.pr-title-prefix }}
8888
- name: Call upgrade provider action
8989
if: github.event_name == 'repository_dispatch'
90-
uses: pulumi/pulumi-upgrade-provider-action@a1d9f03fbfd923f787427c1d9e99c2356711d483 # v0.0.13
90+
uses: pulumi/pulumi-upgrade-provider-action@ff5cb5907aecba099e61146c4d4d074c7fd6ca99 # v0.0.15
9191
with:
9292
kind: ${{ github.event.client_payload.kind || 'bridge' }}
9393

.github/workflows/upgrade-provider.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ jobs:
7676
kind: all
7777
7878
username: pulumi-bot
79-
automerge: false
79+
automerge: true
8080
target-version: ${{ steps.target_version.outputs.version }}
81-
allow-missing-docs: false
81+
allow-missing-docs: true
8282
- name: Comment on upgrade issue if automated PR failed
8383
if: steps.upgrade_provider.outcome == 'failure'
8484
shell: bash

.gitmodules

-4
This file was deleted.

CHANGELOG.md

-10
This file was deleted.

Makefile

+3-111
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PULUMI_MISSING_DOCS_ERROR := true
1717

1818
# Override during CI using `make [TARGET] PROVIDER_VERSION=""` or by setting a PROVIDER_VERSION environment variable
1919
# Local & branch builds will just used this fixed default version unless specified
20-
PROVIDER_VERSION ?= 1.0.0-alpha.0+dev
20+
PROVIDER_VERSION ?= 2.0.0-alpha.0+dev
2121

2222
# Check version doesn't start with a "v" - this is a common mistake
2323
ifeq ($(shell echo $(PROVIDER_VERSION) | cut -c1),v)
@@ -143,7 +143,6 @@ build_nodejs: .make/build_nodejs
143143
.make/generate_nodejs: .make/install_plugins bin/$(CODEGEN)
144144
$(GEN_ENVS) $(WORKING_DIR)/bin/$(CODEGEN) nodejs --out sdk/nodejs/
145145
printf "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17\n" > sdk/nodejs/go.mod
146-
sed -i 's/$${VERSION}/$(PROVIDER_VERSION)/g' sdk/nodejs/package.json
147146
@touch $@
148147
.make/build_nodejs: .make/generate_nodejs
149148
cd sdk/nodejs/ && \
@@ -160,7 +159,6 @@ build_python: .make/build_python
160159
$(GEN_ENVS) $(WORKING_DIR)/bin/$(CODEGEN) python --out sdk/python/
161160
printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > sdk/python/go.mod
162161
cp README.md sdk/python/
163-
sed -i -r 's/(version = ")[0-9]+.[0-9]+.[0-9]+(")/\1$(PROVIDER_VERSION)\2/g' sdk/python/pyproject.toml
164162
@touch $@
165163
.make/build_python: .make/generate_python
166164
cd sdk/python/ && \
@@ -199,15 +197,6 @@ install_nodejs_sdk: .make/install_nodejs_sdk
199197
install_python_sdk:
200198
.PHONY: install_dotnet_sdk install_go_sdk install_java_sdk install_nodejs_sdk install_python_sdk
201199

202-
# Install Pulumi plugins required for CODEGEN to resolve references
203-
install_plugins: .make/install_plugins
204-
.make/install_plugins: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
205-
.make/install_plugins: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
206-
.make/install_plugins: .pulumi/bin/pulumi
207-
.pulumi/bin/pulumi plugin install converter terraform 1.0.16
208-
@touch $@
209-
.PHONY: install_plugins
210-
211200
lint_provider: provider
212201
cd provider && golangci-lint run --path-prefix provider -c ../.golangci.yml
213202
# `lint_provider.fix` is a utility target meant to be run manually
@@ -284,110 +273,13 @@ ci-mgmt: .ci-mgmt.yaml
284273
go run github.com/pulumi/ci-mgmt/provider-ci@master generate
285274
.PHONY: ci-mgmt
286275

287-
# Because some codegen depends on the version of the CLI used, we install a local CLI
288-
# version pinned to the same version as `provider/go.mod`.
289-
#
290-
# This logic compares the version of .pulumi/bin/pulumi already installed. If it matches
291-
# the desired version, we just print. Otherwise we (re)install pulumi at the desired
292-
# version.
293-
.pulumi/bin/pulumi: .pulumi/version
294-
@if [ -x .pulumi/bin/pulumi ] && [ "v$$(cat .pulumi/version)" = "$$(.pulumi/bin/pulumi version)" ]; then \
295-
echo "pulumi/bin/pulumi version: v$$(cat .pulumi/version)"; \
296-
touch $@; \
297-
else \
298-
curl -fsSL https://get.pulumi.com | \
299-
HOME=$(WORKING_DIR) sh -s -- --version "$$(cat .pulumi/version)"; \
300-
fi
301-
302-
# Compute the version of Pulumi to use by inspecting the Go dependencies of the provider.
303-
.pulumi/version: provider/go.mod
304-
cd provider && go list -f "{{slice .Version 1}}" -m github.com/pulumi/pulumi/pkg/v3 | tee ../$@
305-
306276
# Start debug server for tfgen
307277
debug_tfgen:
308278
dlv --listen=:2345 --headless=true --api-version=2 exec $(WORKING_DIR)/bin/$(CODEGEN) -- schema --out provider/cmd/$(PROVIDER)
309279
.PHONY: debug_tfgen
310280

311-
# Provider cross-platform build & packaging
312-
313-
# Set these variables to enable signing of the windows binary
314-
AZURE_SIGNING_CLIENT_ID ?=
315-
AZURE_SIGNING_CLIENT_SECRET ?=
316-
AZURE_SIGNING_TENANT_ID ?=
317-
AZURE_SIGNING_KEY_VAULT_URI ?=
318-
SKIP_SIGNING ?=
319-
320-
# These targets assume that the schema-embed.json exists - it's generated by tfgen.
321-
# We disable CGO to ensure that the binary is statically linked.
322-
bin/linux-amd64/$(PROVIDER): GOOS := linux
323-
bin/linux-amd64/$(PROVIDER): GOARCH := amd64
324-
bin/linux-arm64/$(PROVIDER): GOOS := linux
325-
bin/linux-arm64/$(PROVIDER): GOARCH := arm64
326-
bin/darwin-amd64/$(PROVIDER): GOOS := darwin
327-
bin/darwin-amd64/$(PROVIDER): GOARCH := amd64
328-
bin/darwin-arm64/$(PROVIDER): GOOS := darwin
329-
bin/darwin-arm64/$(PROVIDER): GOARCH := arm64
330-
bin/windows-amd64/$(PROVIDER).exe: GOOS := windows
331-
bin/windows-amd64/$(PROVIDER).exe: GOARCH := amd64
332-
bin/%/$(PROVIDER) bin/%/$(PROVIDER).exe: bin/jsign-6.0.jar
333-
$(call build_provider_cmd,$(GOOS),$(GOARCH),$(WORKING_DIR)/$@)
334-
335-
@# Only sign windows binary if fully configured.
336-
@# Test variables set by joining with | between and looking for || showing at least one variable is empty.
337-
@# Move the binary to a temporary location and sign it there to avoid the target being up-to-date if signing fails.
338-
@set -e; \
339-
if [[ "${GOOS}-${GOARCH}" = "windows-amd64" && "${SKIP_SIGNING}" != "true" ]]; then \
340-
if [[ "|${AZURE_SIGNING_CLIENT_ID}|${AZURE_SIGNING_CLIENT_SECRET}|${AZURE_SIGNING_TENANT_ID}|${AZURE_SIGNING_KEY_VAULT_URI}|" == *"||"* ]]; then \
341-
echo "Can't sign windows binaries as required configuration not set: AZURE_SIGNING_CLIENT_ID, AZURE_SIGNING_CLIENT_SECRET, AZURE_SIGNING_TENANT_ID, AZURE_SIGNING_KEY_VAULT_URI"; \
342-
echo "To rebuild with signing delete the unsigned $@ and rebuild with the fixed configuration"; \
343-
if [[ "${CI}" == "true" ]]; then exit 1; fi; \
344-
else \
345-
346-
az login --service-principal \
347-
--username "${AZURE_SIGNING_CLIENT_ID}" \
348-
--password "${AZURE_SIGNING_CLIENT_SECRET}" \
349-
--tenant "${AZURE_SIGNING_TENANT_ID}" \
350-
--output none; \
351-
ACCESS_TOKEN=$$(az account get-access-token --resource "https://vault.azure.net" | jq -r .accessToken); \
352-
java -jar bin/jsign-6.0.jar \
353-
--storetype AZUREKEYVAULT \
354-
--keystore "PulumiCodeSigning" \
355-
--url "${AZURE_SIGNING_KEY_VAULT_URI}" \
356-
--storepass "$${ACCESS_TOKEN}" \
357-
358-
359-
az logout; \
360-
fi; \
361-
fi
362-
363-
bin/jsign-6.0.jar:
364-
wget https://github.com/ebourg/jsign/releases/download/6.0/jsign-6.0.jar --output-document=bin/jsign-6.0.jar
365-
366-
provider-linux-amd64: bin/linux-amd64/$(PROVIDER)
367-
provider-linux-arm64: bin/linux-arm64/$(PROVIDER)
368-
provider-darwin-amd64: bin/darwin-amd64/$(PROVIDER)
369-
provider-darwin-arm64: bin/darwin-arm64/$(PROVIDER)
370-
provider-windows-amd64: bin/windows-amd64/$(PROVIDER).exe
371-
.PHONY: provider-linux-amd64 provider-linux-arm64 provider-darwin-amd64 provider-darwin-arm64 provider-windows-amd64
372-
373-
bin/$(PROVIDER)-v$(PROVIDER_VERSION)-linux-amd64.tar.gz: bin/linux-amd64/$(PROVIDER)
374-
bin/$(PROVIDER)-v$(PROVIDER_VERSION)-linux-arm64.tar.gz: bin/linux-arm64/$(PROVIDER)
375-
bin/$(PROVIDER)-v$(PROVIDER_VERSION)-darwin-amd64.tar.gz: bin/darwin-amd64/$(PROVIDER)
376-
bin/$(PROVIDER)-v$(PROVIDER_VERSION)-darwin-arm64.tar.gz: bin/darwin-arm64/$(PROVIDER)
377-
bin/$(PROVIDER)-v$(PROVIDER_VERSION)-windows-amd64.tar.gz: bin/windows-amd64/$(PROVIDER).exe
378-
bin/$(PROVIDER)-v$(PROVIDER_VERSION)-%.tar.gz:
379-
@mkdir -p dist
380-
@# $< is the last dependency (the binary path from above) e.g. bin/linux-amd64/pulumi-resource-xyz
381-
@# $@ is the current target e.g. bin/pulumi-resource-xyz-v1.2.3-linux-amd64.tar.gz
382-
tar --gzip -cf $@ README.md LICENSE -C $$(dirname $<) .
383-
384-
provider_dist-linux-amd64: bin/$(PROVIDER)-v$(PROVIDER_VERSION)-linux-amd64.tar.gz
385-
provider_dist-linux-arm64: bin/$(PROVIDER)-v$(PROVIDER_VERSION)-linux-arm64.tar.gz
386-
provider_dist-darwin-amd64: bin/$(PROVIDER)-v$(PROVIDER_VERSION)-darwin-amd64.tar.gz
387-
provider_dist-darwin-arm64: bin/$(PROVIDER)-v$(PROVIDER_VERSION)-darwin-arm64.tar.gz
388-
provider_dist-windows-amd64: bin/$(PROVIDER)-v$(PROVIDER_VERSION)-windows-amd64.tar.gz
389-
provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64
390-
.PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist
281+
include scripts/plugins.mk
282+
include scripts/crossbuild.mk
391283

392284
# Permit providers to extend the Makefile with provider-specific Make includes.
393285
include $(wildcard .mk/*.mk)

deployment-templates/.goreleaser.yml

-29
This file was deleted.

deployment-templates/README-DEPLOYMENT.md

-27
This file was deleted.

0 commit comments

Comments
 (0)