diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..7d46cd807 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,12 @@ +FROM jetpackio/devbox:latest + +# Installing your devbox project +WORKDIR /code +COPY devbox.json devbox.json +COPY devbox.lock devbox.lock +RUN sudo chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /code + + +RUN devbox run -- echo "Installed Packages." + +RUN devbox shellenv --init-hook >> ~/.profile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..e7ae9f11f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "Devbox Remote Container", + "build": { + "dockerfile": "./Dockerfile", + "context": ".." + }, + "customizations": { + "vscode": { + "settings": {}, + "extensions": [ + "jetpack-io.devbox" + ] + } + }, + "remoteUser": "devbox" +} \ No newline at end of file diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index 142393814..997b888d1 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -7,6 +7,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 000000000..ec6b9c91e --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,80 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +name: license_check + +on: + workflow_call: + inputs: {} + + +env: + DOTNETVERSION: | + 6.0.x + 3.1.301 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.21.x + GRADLEVERSION: "7.6" + JAVAVERSION: "11" + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 20.x + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_API: https://api.pulumi-staging.io + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi + TRAVIS_OS_NAME: linux + VAULT_DEV_ROOT_TOKEN_ID: root + +jobs: + license_check: + name: License Check + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + ref: ${{ env.PR_COMMIT_SHA }} + - name: Unshallow clone for tags + run: git fetch --prune --unshallow --tags + - name: Install Go + uses: actions/setup-go@v4 + with: + cache-dependency-path: | + sdk/go.sum + go-version: 1.21.x + - run: make upstream + + # Work around https://github.com/google/go-licenses/issues/244 + - run: cd upstream && go mod edit -go=1.21 && go mod tidy + - run: cd provider && go mod edit -go=1.21 && go mod tidy + + - uses: pulumi/license-check-action@main + with: + module-path: provider + ignore-modules: >- + github.com/aead/chacha20, + github.com/apache/arrow/go/v12, + github.com/apache/thrift/lib/go/thrift, + github.com/cloudflare/circl, + github.com/golang, + github.com/gorhill/cronexpr, + github.com/jmespath/go-jmespath, + github.com/keybase/go-crypto, + github.com/klauspost/compress, + github.com/mattn/go-localereader, + github.com/modern-go/reflect2, + github.com/pierrec/lz4, + github.com/pjbgf/sha1cd, + github.com/pulumi, + github.com/segmentio/asm, + golang.org diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ef68bea9e..63db1a5ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,6 +12,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3906618b6..74ead54ce 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -7,6 +7,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x @@ -76,7 +77,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: @@ -180,6 +181,10 @@ jobs: name: lint uses: ./.github/workflows/lint.yml secrets: inherit + license_check: + name: License Check + uses: ./.github/workflows/license.yml + secrets: inherit prerequisites: name: prerequisites runs-on: ubuntu-latest @@ -255,9 +260,13 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} + + publish: name: publish - needs: test + needs: + - test + - license_check runs-on: ubuntu-latest steps: - name: Checkout Repo @@ -307,7 +316,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.9 + uses: pulumi/pulumi-package-publisher@v0.0.12 - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#FF0000" @@ -388,7 +397,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index d20e39a5c..ec689171d 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -8,6 +8,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x @@ -77,7 +78,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: @@ -127,6 +128,10 @@ jobs: name: lint uses: ./.github/workflows/lint.yml secrets: inherit + license_check: + name: License Check + uses: ./.github/workflows/license.yml + secrets: inherit prerequisites: name: prerequisites runs-on: ubuntu-latest @@ -194,6 +199,7 @@ jobs: with: name: ${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz + retention-days: 30 - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 @@ -201,9 +207,13 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} + + publish: name: publish - needs: test + needs: + - test + - license_check runs-on: ubuntu-latest steps: - name: Checkout Repo @@ -253,7 +263,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.9 + uses: pulumi/pulumi-package-publisher@v0.0.12 - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#FF0000" @@ -316,7 +326,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a2d4bdc37..f9a496ed9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,6 +7,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffe04e348..a9b5c1349 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x @@ -76,7 +77,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: @@ -140,6 +141,10 @@ jobs: name: lint uses: ./.github/workflows/lint.yml secrets: inherit + license_check: + name: License Check + uses: ./.github/workflows/license.yml + secrets: inherit prerequisites: name: prerequisites runs-on: ubuntu-latest @@ -207,6 +212,7 @@ jobs: with: name: ${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz + retention-days: 30 - if: failure() && github.event_name == 'push' name: Notify Slack uses: 8398a7/action-slack@v3 @@ -214,9 +220,13 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} + + publish: name: publish - needs: test + needs: + - test + - license_check runs-on: ubuntu-latest steps: - name: Checkout Repo @@ -265,7 +275,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Publish SDKs - uses: pulumi/pulumi-package-publisher@v0.0.9 + uses: pulumi/pulumi-package-publisher@v0.0.12 - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#FF0000" @@ -362,7 +372,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index a6dbca39f..eb55b1868 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -9,6 +9,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 5187b3700..a58cbd221 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -8,6 +8,7 @@ env: 3.1.301 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOVERSION: 1.21.x + GRADLEVERSION: "7.6" JAVAVERSION: "11" NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODEVERSION: 20.x @@ -81,7 +82,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: @@ -157,8 +158,6 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - name: Checkout Scripts Repo uses: actions/checkout@v3 with: @@ -228,6 +227,8 @@ jobs: author_name: Failure in building provider prerequisites fields: repo,commit,author,action status: ${{ job.status }} + + sentinel: name: sentinel # We would like to be able to specify `sentinel` as the only required job for this @@ -241,23 +242,24 @@ jobs: # # GitHub documents `jobs.result` as: # - # The result of a job in the reusable workflow. Possible values are success, - # failure, cancelled, or skipped. + # The result of a job in the reusable workflow. Possible values are success, + # failure, cancelled, or skipped. # # GitHub documents `cancelled()` as: # - # Returns true if the workflow was canceled. + # Returns true if the workflow was canceled. # # Combining these terms gives us an intuitive definition of success: # - # We have succeeded when no dependent workflow has failed and the job was - # not cancelled. + # We have succeeded when no dependent workflow has failed and the job was + # not cancelled. # if: (github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository) && ! cancelled() needs: - test + - license_check - lint runs-on: ubuntu-latest steps: @@ -321,7 +323,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: "7.6" + gradle-version: ${{ env.GRADLEVERSION }} - name: Download provider + tfgen binaries uses: actions/download-artifact@v2 with: @@ -376,6 +378,10 @@ jobs: - dotnet - go - java + license_check: + name: License Check + uses: ./.github/workflows/license.yml + secrets: inherit name: run-acceptance-tests on: pull_request: diff --git a/.github/workflows/upgrade-bridge.yml b/.github/workflows/upgrade-bridge.yml index e3c3e9cf5..11421faa7 100644 --- a/.github/workflows/upgrade-bridge.yml +++ b/.github/workflows/upgrade-bridge.yml @@ -1,5 +1,43 @@ # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt +name: Upgrade bridge +on: + repository_dispatch: + types: + - upgrade-bridge + workflow_dispatch: + inputs: + target-bridge-version: + description: pulumi-terraform-bridge version or hash reference + required: false + type: string + default: "latest" + target-pulumi-version: + description: | + Set the version of `pulumi/pkg` and `pulumi/sdk` to depend on for bridged providers. Currently, + these versions inform the linked runtime and SDK generation in all languages except Java. Valid + options are: + - "": Use the same version as pulumi-terraform-bridge + - A go version such as "v3.90.1" + - A commit SHA in pulumi/pulumi such as "ac71ebc1d34e5ccfd1a7fed61e6ff43a3160f3cb" + required: false + type: string + default: "" + pr-reviewers: + description: Reviewers to assign to the auto-opened pull request + required: false + type: string + default: "" + pr-description: + description: Extra description to add to the auto-opened pull request + required: false + type: string + default: "" + automerge: + description: Mark created PR for auto-merging? + required: false + type: boolean + default: false env: GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -9,12 +47,29 @@ jobs: runs-on: ubuntu-latest steps: - name: Call upgrade provider action - uses: pulumi/pulumi-upgrade-provider-action@v0.0.8 + if: github.event_name == 'workflow_dispatch' + uses: pulumi/pulumi-upgrade-provider-action@v0.0.10 with: kind: bridge email: bot@pulumi.com username: pulumi-bot automerge: ${{ inputs.automerge }} + target-bridge-version: ${{ inputs.target-bridge-version }} + target-pulumi-version: ${{ inputs.target-pulumi-version }} + pr-reviewers: ${{ inputs.pr-reviewers }} + pr-description: ${{ inputs.pr-description }} + - name: Call upgrade provider action + if: github.event_name == 'repository_dispatch' + uses: pulumi/pulumi-upgrade-provider-action@v0.0.10 + with: + kind: bridge + email: bot@pulumi.com + username: pulumi-bot + automerge: ${{ github.event.client_payload.automerge }} + target-pulumi-version: ${{ github.event.client_payload.target-pulumi-version }} + target-bridge-version: ${{ github.event.client_payload.target-bridge-version }} + pr-reviewers: ${{ github.event.client_payload.pr-reviewers }} + pr-description: ${{ github.event.client_payload.pr-description }} - env: SLACK_CHANNEL: provider-upgrade-publish-status SLACK_COLOR: "#7CFC00" @@ -39,12 +94,3 @@ jobs: if: failure() name: Send Upgrade Failure To Slack uses: rtCamp/action-slack-notify@v2 -name: Upgrade bridge -on: - workflow_dispatch: - inputs: - automerge: - description: Mark created PR for auto-merging? - required: false - type: boolean - default: false diff --git a/.github/workflows/upgrade-provider.yml b/.github/workflows/upgrade-provider.yml index 39972938a..959c20dac 100644 --- a/.github/workflows/upgrade-provider.yml +++ b/.github/workflows/upgrade-provider.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Call upgrade provider action - uses: pulumi/pulumi-upgrade-provider-action@v0.0.8 + uses: pulumi/pulumi-upgrade-provider-action@v0.0.10 with: kind: all email: bot@pulumi.com diff --git a/.gitignore b/.gitignore index a50319158..45d933eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ sdk/java/.gradle sdk/java/gradle sdk/java/gradlew sdk/java/gradlew.bat + + +sdk/python/venv diff --git a/.upgrade-config.yml b/.upgrade-config.yml index 500741b8e..cf473c927 100644 --- a/.upgrade-config.yml +++ b/.upgrade-config.yml @@ -4,6 +4,5 @@ upstream-provider-name: terraform-provider-vault pulumi-infer-version: true remove-plugins: true -pr-reviewers: pulumi/Providers,lukehoban - +pr-reviewers: iwahbe # Team: pulumi/Providers javaVersion: "v0.9.5" diff --git a/Makefile b/Makefile index 1ae480dc0..d706d2f86 100644 --- a/Makefile +++ b/Makefile @@ -62,15 +62,18 @@ build_nodejs: upstream build_python: PYPI_VERSION := $(shell pulumictl get version --language python) build_python: upstream + rm -rf sdk/python/ $(WORKING_DIR)/bin/$(TFGEN) python --out sdk/python/ cd sdk/python/ && \ printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \ cp ../../README.md . && \ - python3 setup.py clean --all 2>/dev/null && \ rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \ - sed -i.bak -e 's/^VERSION = .*/VERSION = "$(PYPI_VERSION)"/g' -e 's/^PLUGIN_VERSION = .*/PLUGIN_VERSION = "$(VERSION)"/g' ./bin/setup.py && \ - rm ./bin/setup.py.bak && rm ./bin/go.mod && \ - cd ./bin && python3 setup.py build sdist + sed -i.bak -e 's/^ version = .*/ version = "$(PYPI_VERSION)"/g' ./bin/pyproject.toml && \ + rm ./bin/pyproject.toml.bak && rm ./bin/go.mod && \ + python3 -m venv venv && \ + ./venv/bin/python -m pip install build && \ + cd ./bin && \ + ../venv/bin/python -m build . clean: rm -rf sdk/{dotnet,nodejs,go,python} @@ -117,17 +120,17 @@ tfgen: install_plugins upstream upstream: ifneq ("$(wildcard upstream)","") - @$(SHELL) ./scripts/upstream.sh "$@" apply + scripts/upstream.sh "$@" apply endif upstream.finalize: - @$(SHELL) ./scripts/upstream.sh "$@" end_rebase + scripts/upstream.sh "$@" end_rebase upstream.rebase: - @$(SHELL) ./scripts/upstream.sh "$@" start_rebase + scripts/upstream.sh "$@" start_rebase bin/pulumi-java-gen: - $(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java) + pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java # To make an immediately observable change to .ci-mgmt.yaml: # diff --git a/devbox.json b/devbox.json new file mode 100644 index 000000000..e10080eb1 --- /dev/null +++ b/devbox.json @@ -0,0 +1,19 @@ +{ + "packages": [ + "go@1.21.", + "nodejs@20.", + "python3@3.9", + "dotnet-sdk@6.0.", + "gradle_7@7.6" + ], + "shell": { + "init_hook": [ + "export PATH=\"$(pwd)/bin/:$PATH\"" + ], + "scripts": { + "test": [ + "echo \"Error: no test specified\" && exit 1" + ] + } + } +} diff --git a/provider/cmd/pulumi-resource-vault/schema.json b/provider/cmd/pulumi-resource-vault/schema.json index ca147bf70..64281ee22 100644 --- a/provider/cmd/pulumi-resource-vault/schema.json +++ b/provider/cmd/pulumi-resource-vault/schema.json @@ -75,7 +75,9 @@ }, "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/hashicorp/terraform-provider-vault)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-vault` repo](https://github.com/pulumi/pulumi-vault/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-vault` repo](https://github.com/hashicorp/terraform-provider-vault/issues).", "compatibility": "tfbridge20", - "pyproject": {} + "pyproject": { + "enabled": true + } } }, "config": { diff --git a/provider/go.mod b/provider/go.mod index 6ac36bdd6..ef307c8d2 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -2,8 +2,6 @@ module github.com/pulumi/pulumi-vault/provider/v5 go 1.21.3 -toolchain go1.21.4 - require ( github.com/hashicorp/terraform-provider-vault v0.0.0 github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.2 diff --git a/provider/resources.go b/provider/resources.go index eeeb75fea..50726a9e6 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -486,11 +486,15 @@ func Provider() tfbridge.ProviderInfo { "@types/mime": "^2.0.0", }, }, - Python: &tfbridge.PythonInfo{ - Requires: map[string]string{ - "pulumi": ">=3.0.0,<4.0.0", - }, - }, + Python: (func() *tfbridge.PythonInfo { + i := &tfbridge.PythonInfo{ + Requires: map[string]string{ + "pulumi": ">=3.0.0,<4.0.0", + }} + i.PyProject.Enabled = true + return i + })(), + Golang: &tfbridge.GolangInfo{ ImportBasePath: filepath.Join( fmt.Sprintf("github.com/pulumi/pulumi-%[1]s/sdk/", mainPkg), diff --git a/scripts/upstream.sh b/scripts/upstream.sh old mode 100644 new mode 100755 index eddab76e9..09d7ad85f --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -1,4 +1,4 @@ -# +#!/usr/bin/env bash # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt set -e @@ -164,8 +164,11 @@ EOF # It is used to make the error message more actionable. end_rebase() { assert_rebase_in_progress "$1" + # Use git to resolve the possible location of files indicating a rebase might be in progress. + rebase_merge_dir=$(cd upstream && git rev-parse --git-path rebase-merge) + rebase_apply_dir=$(cd upstream && git rev-parse --git-path rebase-apply) - if [ -d .git/modules/upstream/rebase-merge ]; then + if [ -d "${rebase_merge_dir}" ] || [ -d "${rebase_apply_dir}" ]; then echo "rebase still in progress in './upstream'. Please resolve the rebase in" echo "'./upstream' and then run 'make \"$1\"' again." exit 1 @@ -173,8 +176,10 @@ end_rebase() { rm patches/*.patch cd upstream - git format-patch local -o ../patches - rm ../rebase-in-progress + git format-patch local -o ../patches --zero-commit --no-signature --no-stat + cd .. + rm rebase-in-progress + apply "$1" } case $2 in diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml new file mode 100644 index 000000000..8f25100ad --- /dev/null +++ b/sdk/python/pyproject.toml @@ -0,0 +1,22 @@ +[project] + name = "pulumi_vault" + description = "A Pulumi package for creating and managing HashiCorp Vault cloud resources." + dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"] + keywords = ["pulumi", "vault"] + readme = "README.md" + requires-python = ">=3.7" + version = "0.0.0" + [project.license] + text = "Apache-2.0" + [project.urls] + Homepage = "https://pulumi.io" + Repository = "https://github.com/pulumi/pulumi-vault" + +[build-system] + requires = ["setuptools>=61.0"] + build-backend = "setuptools.build_meta" + +[tool] + [tool.setuptools] + [tool.setuptools.package-data] + pulumi_vault = ["py.typed", "pulumi-plugin.json"] diff --git a/sdk/python/setup.py b/sdk/python/setup.py deleted file mode 100644 index 2c9501210..000000000 --- a/sdk/python/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -import errno -from setuptools import setup, find_packages -from setuptools.command.install import install -from subprocess import check_call - - -VERSION = "0.0.0" -def readme(): - try: - with open('README.md', encoding='utf-8') as f: - return f.read() - except FileNotFoundError: - return "vault Pulumi Package - Development Version" - - -setup(name='pulumi_vault', - python_requires='>=3.7', - version=VERSION, - description="A Pulumi package for creating and managing HashiCorp Vault cloud resources.", - long_description=readme(), - long_description_content_type='text/markdown', - keywords='pulumi vault', - url='https://pulumi.io', - project_urls={ - 'Repository': 'https://github.com/pulumi/pulumi-vault' - }, - license='Apache-2.0', - packages=find_packages(), - package_data={ - 'pulumi_vault': [ - 'py.typed', - 'pulumi-plugin.json', - ] - }, - install_requires=[ - 'parver>=0.2.1', - 'pulumi>=3.0.0,<4.0.0', - 'semver>=2.8.1' - ], - zip_safe=False)