From d76596c5bb93e3c69300af4ce0c862e6ce590115 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:23:52 -0400 Subject: [PATCH] chore: rename provider and remove unneeded boilerplate (#1) --- .github/workflows/artifact-cleanup.yml | 13 + .github/workflows/build.yml | 556 +++++++++++++++++ .github/workflows/command-dispatch.yml | 52 ++ .github/workflows/pull-request.yml | 49 ++ .github/workflows/release.yml | 574 ++++++++++++++++++ .gitignore | 2 + .pulumi.version | 1 + Makefile | 130 ++-- README.md | 125 +--- examples/simple/Pulumi.yaml | 4 +- examples/simple/index.ts | 8 +- .../.gitignore | 0 .../PulumiPlugin.yaml | 0 .../lambda_builders_provider}/__init__.py | 0 .../lambda_builders_provider}/__main__.py | 6 +- .../lambda_builders_provider/provider.py | 39 ++ .../pulumi-resource-lambda-builders} | 0 .../pulumi-resource-lambda-builders.cmd} | 0 .../requirements.txt | 2 + .../run-provider.py | 8 +- .../pulumi-resource-lambda-builders/setup.py | 25 + .../cmd/pulumi-resource-xyz/requirements.txt | 2 - provider/cmd/pulumi-resource-xyz/setup.py | 25 - .../xyz_provider/provider.py | 55 -- .../xyz_provider/staticpage.py | 92 --- provider/go.mod | 2 +- schema.json | 41 +- sdk/dotnet/Provider.cs | 13 +- ...yz.csproj => Pulumi.LambdaBuilders.csproj} | 7 +- sdk/dotnet/StaticPage.cs | 65 -- sdk/dotnet/Utilities.cs | 10 +- sdk/dotnet/pulumi-plugin.json | 2 +- sdk/go.mod | 58 -- sdk/go.sum | 390 ------------ sdk/go/lambda-builders/doc.go | 2 + sdk/go/lambda-builders/init.go | 41 ++ .../internal/pulumiUtilities.go | 184 ++++++ .../lambda-builders/internal/pulumiVersion.go | 11 + sdk/go/{xyz => lambda-builders}/provider.go | 8 +- sdk/go/lambda-builders/pulumi-plugin.json | 4 + sdk/go/xyz/doc.go | 2 - sdk/go/xyz/init.go | 62 -- sdk/go/xyz/pulumi-plugin.json | 4 - sdk/go/xyz/pulumiUtilities.go | 87 --- sdk/go/xyz/staticPage.go | 187 ------ sdk/nodejs/index.ts | 30 +- sdk/nodejs/package.json | 17 +- sdk/nodejs/provider.ts | 6 +- sdk/nodejs/scripts/install-pulumi-plugin.js | 26 - sdk/nodejs/staticPage.ts | 67 -- sdk/nodejs/tsconfig.json | 1 - sdk/nodejs/utilities.ts | 43 +- sdk/python/README.md | 125 +--- .../README.md | 0 .../__init__.py | 20 +- .../_utilities.py | 61 +- .../provider.py | 14 +- .../pulumi_lambda_builders/pulumi-plugin.json | 4 + .../py.typed | 0 sdk/python/pulumi_xyz/pulumi-plugin.json | 4 - sdk/python/pulumi_xyz/static_page.py | 115 ---- sdk/python/setup.py | 34 +- 62 files changed, 1828 insertions(+), 1687 deletions(-) create mode 100644 .github/workflows/artifact-cleanup.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/command-dispatch.yml create mode 100644 .github/workflows/pull-request.yml create mode 100644 .github/workflows/release.yml create mode 100644 .pulumi.version rename provider/cmd/{pulumi-resource-xyz => pulumi-resource-lambda-builders}/.gitignore (100%) rename provider/cmd/{pulumi-resource-xyz => pulumi-resource-lambda-builders}/PulumiPlugin.yaml (100%) rename provider/cmd/{pulumi-resource-xyz/xyz_provider => pulumi-resource-lambda-builders/lambda_builders_provider}/__init__.py (100%) rename provider/cmd/{pulumi-resource-xyz/xyz_provider => pulumi-resource-lambda-builders/lambda_builders_provider}/__main__.py (80%) create mode 100644 provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/provider.py rename provider/cmd/{pulumi-resource-xyz/pulumi-resource-xyz => pulumi-resource-lambda-builders/pulumi-resource-lambda-builders} (100%) rename provider/cmd/{pulumi-resource-xyz/pulumi-resource-xyz.cmd => pulumi-resource-lambda-builders/pulumi-resource-lambda-builders.cmd} (100%) create mode 100644 provider/cmd/pulumi-resource-lambda-builders/requirements.txt rename provider/cmd/{pulumi-resource-xyz => pulumi-resource-lambda-builders}/run-provider.py (77%) create mode 100644 provider/cmd/pulumi-resource-lambda-builders/setup.py delete mode 100644 provider/cmd/pulumi-resource-xyz/requirements.txt delete mode 100644 provider/cmd/pulumi-resource-xyz/setup.py delete mode 100644 provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py delete mode 100644 provider/cmd/pulumi-resource-xyz/xyz_provider/staticpage.py rename sdk/dotnet/{Pulumi.Xyz.csproj => Pulumi.LambdaBuilders.csproj} (90%) delete mode 100644 sdk/dotnet/StaticPage.cs delete mode 100644 sdk/go.mod delete mode 100644 sdk/go.sum create mode 100644 sdk/go/lambda-builders/doc.go create mode 100644 sdk/go/lambda-builders/init.go create mode 100644 sdk/go/lambda-builders/internal/pulumiUtilities.go create mode 100644 sdk/go/lambda-builders/internal/pulumiVersion.go rename sdk/go/{xyz => lambda-builders}/provider.go (85%) create mode 100644 sdk/go/lambda-builders/pulumi-plugin.json delete mode 100644 sdk/go/xyz/doc.go delete mode 100644 sdk/go/xyz/init.go delete mode 100644 sdk/go/xyz/pulumi-plugin.json delete mode 100644 sdk/go/xyz/pulumiUtilities.go delete mode 100644 sdk/go/xyz/staticPage.go delete mode 100644 sdk/nodejs/scripts/install-pulumi-plugin.js delete mode 100644 sdk/nodejs/staticPage.ts rename sdk/python/{pulumi_xyz => pulumi_lambda_builders}/README.md (100%) rename sdk/python/{pulumi_xyz => pulumi_lambda_builders}/__init__.py (51%) rename sdk/python/{pulumi_xyz => pulumi_lambda_builders}/_utilities.py (81%) rename sdk/python/{pulumi_xyz => pulumi_lambda_builders}/provider.py (85%) create mode 100644 sdk/python/pulumi_lambda_builders/pulumi-plugin.json rename sdk/python/{pulumi_xyz => pulumi_lambda_builders}/py.typed (100%) delete mode 100644 sdk/python/pulumi_xyz/pulumi-plugin.json delete mode 100644 sdk/python/pulumi_xyz/static_page.py diff --git a/.github/workflows/artifact-cleanup.yml b/.github/workflows/artifact-cleanup.yml new file mode 100644 index 0000000..d99e870 --- /dev/null +++ b/.github/workflows/artifact-cleanup.yml @@ -0,0 +1,13 @@ +jobs: + remove-old-artifacts: + runs-on: ubuntu-latest + steps: + - name: Remove old artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: 1 month + skip-tags: true +name: cleanup +"on": + schedule: + - cron: 0 1 * * * diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9148993 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,556 @@ +name: build +on: + push: + branches: + - master + - main + - feature-** + paths-ignore: + - CHANGELOG.md + tags-ignore: + - v* + - sdk/* + - "**" + workflow_dispatch: {} +env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + PROVIDER: lambda-builders + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TRAVIS_OS_NAME: linux + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + GOVERSION: 1.21.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" + AWS_REGION: us-west-2 + PULUMI_TEST_OWNER: moolumi + GOLANGCI_LINT_VERSION: v1.55.2 +jobs: + prerequisites: + runs-on: ubuntu-latest + name: prerequisites + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - if: github.event_name == 'pull_request' + name: Install Schema Tools + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/schema-tools + - name: Build codegen binaries + run: make codegen + - name: Build Schema + run: make generate_schema + - if: github.event_name == 'pull_request' + name: Check Schema is Valid + run: >- + echo 'SCHEMA_CHANGES<> $GITHUB_ENV + + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV + + echo 'EOF' >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + - if: github.event_name == 'pull_request' + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ env.SCHEMA_CHANGES }} + comment_tag: schemaCheck + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - if: contains(env.SCHEMA_CHANGES, 'Looking good! No breaking changes found.') && + github.actor == 'pulumi-bot' + name: Add label if no breaking changes + uses: actions-ecosystem/action-add-labels@v1.1.0 + with: + labels: impact/no-changelog-required + number: ${{ github.event.issue.number }} + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Build Provider + run: make provider + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - run: git status --porcelain + - name: Tar provider binaries + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} + pulumi-gen-${{ env.PROVIDER}} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + - name: Test Provider Library + run: make test_provider + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in building provider prerequisites + fields: repo,commit,author,action + status: ${{ job.status }} + build_sdks: + needs: prerequisites + runs-on: pulumi-ubuntu-8core + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: build_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: UnTar provider binaries + run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Generate SDK + run: make generate_${{ matrix.language }} + - name: Build SDK + run: make build_${{ matrix.language }} + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - run: git status --porcelain + - name: Tar SDK folder + run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + retention-days: 30 + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure while building SDKs + fields: repo,commit,author,action + status: ${{ job.status }} + test: + runs-on: pulumi-ubuntu-8core + needs: + - build_sdks + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: test + permissions: + contents: read + id-token: write + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: UnTar provider binaries + run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: UnTar SDK folder + run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ + github.workspace}}/sdk/${{ matrix.language}} + - name: Update path + run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + - name: Install Node dependencies + run: yarn global add typescript + - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Install Python deps + run: |- + pip3 install virtualenv==20.0.23 + pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + version: v2.5.0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run tests + run: >- + set -euo pipefail + + cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in SDK tests + fields: repo,commit,author,action + status: ${{ job.status }} + publish: + runs-on: ubuntu-latest + needs: test + name: publish + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Clear GitHub Actions Ubuntu runner disk space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + android: true + haskell: true + swap-storage: true + large-packages: false + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-region: us-east-2 + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-duration-seconds: 7200 + role-session-name: ${{ env.PROVIDER }}@githubActions + role-external-id: upload-pulumi-release + role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} + # TODO: publishing + # - name: Run GoReleaser + # uses: goreleaser/goreleaser-action@v5 + # env: + # GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} + # with: + # args: -p 3 -f .goreleaser.prerelease.yml --clean --skip=validate --timeout 60m0s + # version: latest + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in publishing binaries + fields: repo,commit,author,action + status: ${{ job.status }} + publish_sdk: + runs-on: ubuntu-latest + needs: publish + name: publish_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Checkout Scripts Repo + uses: actions/checkout@v4 + with: + path: ci-scripts + repository: pulumi/scripts + - run: echo "ci-scripts" >> .git/info/exclude + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Download python SDK + uses: actions/download-artifact@v4 + with: + name: python-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress python SDK + run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C + ${{github.workspace}}/sdk/python + - name: Download dotnet SDK + uses: actions/download-artifact@v4 + with: + name: dotnet-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress dotnet SDK + run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C + ${{github.workspace}}/sdk/dotnet + - name: Download nodejs SDK + uses: actions/download-artifact@v4 + with: + name: nodejs-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress nodejs SDK + run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C + ${{github.workspace}}/sdk/nodejs + - name: Install Twine + run: python -m pip install pip twine + - name: Publish SDKs + run: ./ci-scripts/ci/publish-tfgen-package ${{ github.workspace }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + PYPI_PUBLISH_ARTIFACTS: all + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in publishing SDK + fields: repo,commit,author,action + status: ${{ job.status }} + publish_java_sdk: + runs-on: ubuntu-latest + continue-on-error: true + needs: publish + name: publish_java_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" + - name: Download java SDK + uses: actions/download-artifact@v4 + with: + name: java-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress java SDK + run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C + ${{github.workspace}}/sdk/java + - name: Publish Java SDK + uses: gradle/gradle-build-action@v3 + env: + PACKAGE_VERSION: ${{ env.PROVIDER_VERSION }} + with: + arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository + build-root-directory: ./sdk/java + gradle-version: 7.4.1 + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + ref: ${{ env.PR_COMMIT_SHA }} + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: golangci-lint provider pkg + uses: golangci/golangci-lint-action@v4 + with: + version: ${{ env.GOLANGCI_LINT_VERSION }} + args: -c ../.golangci.yml + working-directory: provider + name: lint + if: github.event_name == 'repository_dispatch' || + github.event.pull_request.head.repo.full_name == github.repository diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml new file mode 100644 index 0000000..4facc83 --- /dev/null +++ b/.github/workflows/command-dispatch.yml @@ -0,0 +1,52 @@ +name: command-dispatch +on: + issue_comment: + types: + - created + - edited +env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + PROVIDER: lambda-builders + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TRAVIS_OS_NAME: linux + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + GOVERSION: 1.21.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" + AWS_REGION: us-west-2 + PULUMI_TEST_OWNER: moolumi + GOLANGCI_LINT_VERSION: v1.55.2 +jobs: + command-dispatch-for-testing: + runs-on: ubuntu-latest + name: command-dispatch-for-testing + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - uses: peter-evans/slash-command-dispatch@v2 + with: + token: ${{ secrets.PULUMI_BOT_TOKEN }} + reaction-token: ${{ secrets.GITHUB_TOKEN }} + commands: run-acceptance-tests + permission: write + issue-type: pull-request + repository: pulumi/pulumi-lambda-builders + if: ${{ github.event.issue.pull_request }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..bceea84 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,49 @@ +name: pull-request +on: + pull_request_target: {} +env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + PROVIDER: lambda-builders + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TRAVIS_OS_NAME: linux + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + GOVERSION: 1.21.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" + AWS_REGION: us-west-2 + PULUMI_TEST_OWNER: moolumi + GOLANGCI_LINT_VERSION: v1.55.2 +jobs: + comment-on-pr: + runs-on: ubuntu-latest + name: comment-on-pr + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - name: Comment PR + uses: thollander/actions-comment-pull-request@v2 + with: + message: > + PR is now waiting for a maintainer to run the acceptance tests. + + **Note for the maintainer:** To run the acceptance tests, please comment */run-acceptance-tests* on the PR + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: github.event.pull_request.head.repo.full_name != github.repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2b792dd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,574 @@ +name: release +on: + push: + tags: + - v*.*.* + - "!v*.*.*-**" +env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + PROVIDER: lambda-builders + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TRAVIS_OS_NAME: linux + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. + PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + GOVERSION: 1.21.x + NODEVERSION: 20.x + PYTHONVERSION: "3.11" + DOTNETVERSION: | + 6.0.x + 3.1.301 + JAVAVERSION: "11" + AWS_REGION: us-west-2 + PULUMI_TEST_OWNER: moolumi + GOLANGCI_LINT_VERSION: v1.55.2 +jobs: + prerequisites: + runs-on: ubuntu-latest + name: prerequisites + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - if: github.event_name == 'pull_request' + name: Install Schema Tools + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/schema-tools + - name: Build codegen binaries + run: make codegen + - name: Build Schema + run: make generate_schema + - if: github.event_name == 'pull_request' + name: Check Schema is Valid + run: >- + echo 'SCHEMA_CHANGES<> $GITHUB_ENV + + schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV + + echo 'EOF' >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + - if: github.event_name == 'pull_request' + name: Comment on PR with Details of Schema Check + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ env.SCHEMA_CHANGES }} + comment_tag: schemaCheck + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - if: contains(env.SCHEMA_CHANGES, 'Looking good! No breaking changes found.') && + github.actor == 'pulumi-bot' + name: Add label if no breaking changes + uses: actions-ecosystem/action-add-labels@v1.1.0 + with: + labels: impact/no-changelog-required + number: ${{ github.event.issue.number }} + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Build Provider + run: make provider + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - run: git status --porcelain + - name: Tar provider binaries + run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} + pulumi-gen-${{ env.PROVIDER}} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin/provider.tar.gz + - name: Test Provider Library + run: make test_provider + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in building provider prerequisites + fields: repo,commit,author,action + status: ${{ job.status }} + build_sdks: + needs: prerequisites + runs-on: pulumi-ubuntu-8core + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: build_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: UnTar provider binaries + run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Generate SDK + run: make generate_${{ matrix.language }} + - name: Build SDK + run: make build_${{ matrix.language }} + - name: Check worktree clean + uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: |- + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/**/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml + - run: git status --porcelain + - name: Tar SDK folder + run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure while building SDKs + fields: repo,commit,author,action + status: ${{ job.status }} + test: + runs-on: pulumi-ubuntu-8core + needs: + - build_sdks + strategy: + fail-fast: true + matrix: + language: + - nodejs + - python + - dotnet + - go + - java + name: test + permissions: + contents: read + id-token: write + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" + - name: Download provider + tfgen binaries + uses: actions/download-artifact@v4 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin + - name: UnTar provider binaries + run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ + github.workspace}}/bin + - name: Restore Binary Permissions + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print + -exec chmod +x {} \; + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.language }}-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: UnTar SDK folder + run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ + github.workspace}}/sdk/${{ matrix.language}} + - name: Update path + run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + - name: Install Node dependencies + run: yarn global add typescript + - run: dotnet nuget add source ${{ github.workspace }}/nuget + - name: Install Python deps + run: |- + pip3 install virtualenv==20.0.23 + pip3 install pipenv + - name: Install dependencies + run: make install_${{ matrix.language}}_sdk + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + version: v2.5.0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run tests + run: >- + set -euo pipefail + + cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in SDK tests + fields: repo,commit,author,action + status: ${{ job.status }} + publish: + runs-on: ubuntu-latest + needs: test + name: publish + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Clear GitHub Actions Ubuntu runner disk space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + android: true + haskell: true + swap-storage: true + large-packages: false + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-region: us-east-2 + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-duration-seconds: 7200 + role-session-name: ${{ env.PROVIDER }}@githubActions + role-external-id: upload-pulumi-release + role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} + # TODO: figure out publishing + # - name: Run GoReleaser + # uses: goreleaser/goreleaser-action@v5 + # env: + # GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} + # with: + # args: -p 3 release --clean --timeout 60m0s + # version: latest + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in publishing binaries + fields: repo,commit,author,action + status: ${{ job.status }} + publish_sdk: + runs-on: ubuntu-latest + needs: publish + name: publish_sdks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Checkout Scripts Repo + uses: actions/checkout@v4 + with: + path: ci-scripts + repository: pulumi/scripts + - run: echo "ci-scripts" >> .git/info/exclude + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEVERSION }} + registry-url: https://registry.npmjs.org + - name: Setup DotNet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNETVERSION }} + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHONVERSION }} + - name: Download python SDK + uses: actions/download-artifact@v4 + with: + name: python-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress python SDK + run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C + ${{github.workspace}}/sdk/python + - name: Download dotnet SDK + uses: actions/download-artifact@v4 + with: + name: dotnet-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress dotnet SDK + run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C + ${{github.workspace}}/sdk/dotnet + - name: Download nodejs SDK + uses: actions/download-artifact@v4 + with: + name: nodejs-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress nodejs SDK + run: tar -zxf ${{github.workspace}}/sdk/nodejs.tar.gz -C + ${{github.workspace}}/sdk/nodejs + - name: Install Twine + run: python -m pip install pip twine + - name: Publish SDKs + run: ./ci-scripts/ci/publish-tfgen-package ${{ github.workspace }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + PYPI_PUBLISH_ARTIFACTS: all + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in publishing SDK + fields: repo,commit,author,action + status: ${{ job.status }} + publish_java_sdk: + runs-on: ubuntu-latest + continue-on-error: true + needs: publish + name: publish_java_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GOVERSION }} + cache-dependency-path: "**/*.sum" + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/actions@v5 + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVAVERSION }} + distribution: temurin + cache: gradle + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + with: + gradle-version: "7.6" + - name: Download java SDK + uses: actions/download-artifact@v4 + with: + name: java-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress java SDK + run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C + ${{github.workspace}}/sdk/java + - name: Publish Java SDK + uses: gradle/gradle-build-action@v3 + env: + PACKAGE_VERSION: ${{ env.PROVIDER_VERSION }} + with: + arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository + build-root-directory: ./sdk/java + gradle-version: 7.4.1 + publish_go_sdk: + runs-on: ubuntu-latest + name: publish-go-sdk + needs: publish_sdk + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + lfs: true + - id: version + name: Set Provider Version + uses: pulumi/provider-version-action@v1 + with: + set-env: PROVIDER_VERSION + - name: Download go SDK + uses: actions/download-artifact@v4 + with: + name: go-sdk.tar.gz + path: ${{ github.workspace}}/sdk/ + - name: Uncompress go SDK + run: tar -zxf ${{github.workspace}}/sdk/go.tar.gz -C + ${{github.workspace}}/sdk/go + - name: Publish Go SDK + uses: pulumi/publish-go-sdk-action@v1 + with: + repository: ${{ github.repository }} + base-ref: ${{ github.sha }} + source: sdk + path: sdk + version: ${{ steps.version.outputs.version }} + additive: false + files: |- + go.* + go/** + !*.tar.gz + dispatch_docs_build: + runs-on: ubuntu-latest + needs: publish_go_sdk + steps: + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + repo: pulumi/pulumictl + - name: Dispatch Event + run: pulumictl create docs-build pulumi-${{ env.PROVIDER }} + ${GITHUB_REF#refs/tags/} + env: + GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + name: dispatch_docs_build diff --git a/.gitignore b/.gitignore index e2b0987..7d37023 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ ci-scripts/ # This is an artifact only so that we can pass the # schema for the provider GetSchema gRPC request /provider/cmd/pulumi-resource-*/*/schema.json +/provider/cmd/pulumi-resource-*/build/ + diff --git a/.pulumi.version b/.pulumi.version new file mode 100644 index 0000000..ae03d83 --- /dev/null +++ b/.pulumi.version @@ -0,0 +1 @@ +3.120.0 diff --git a/Makefile b/Makefile index 98fc26d..544e1df 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ -VERSION := 0.0.1 +PROVIDER_VERSION ?= 1.0.0-alpha.0+dev +VERSION_GENERIC = $(shell pulumictl convert-version --language generic --version "$(PROVIDER_VERSION)") -PACK := xyz +PACK := lambda-builders +PACK_ := lambda_builders PROJECT := github.com/pulumi/pulumi-${PACK} PROVIDER := pulumi-resource-${PACK} +CODEGEN := pulumi-gen-${PACK} VERSION_PATH := provider/pkg/version.Version WORKING_DIR := $(shell pwd) @@ -11,34 +14,53 @@ SCHEMA_PATH := ${WORKING_DIR}/schema.json SRC := provider/cmd/pulumi-resource-${PACK} -# The pulumi binary to use during generation -PULUMI := .pulumi/bin/pulumi - +# Need to pick up locally pinned pulumi-language-* plugins export PULUMI_IGNORE_AMBIENT_PLUGINS = true +export GOPATH := $(shell go env GOPATH) + +# Ensure the codegen file is present so that the hard-coded "Tar provider binaries" step doesn't fail +codegen: .pulumi/bin/pulumi # Required by CI + mkdir -p bin && touch bin/pulumi-lambda-builders + +provider: build_provider # Required by CI +test_provider: # Required by CI +generate_schema: # Required by CI +local_generate: generate # Required by CI generate:: gen_go_sdk gen_dotnet_sdk gen_nodejs_sdk gen_python_sdk -gen_sdk_prerequisites: $(PULUMI) build:: build_provider build_dotnet_sdk build_nodejs_sdk build_python_sdk + install:: install_dotnet_sdk install_nodejs_sdk +ensure:: tidy + +tidy: tidy_provider tidy_examples + cd sdk && go mod tidy + +tidy_examples: + cd examples && go mod tidy + +tidy_provider: + cd provider && go mod tidy + # Provider PROVIDER_FILES = bin/PulumiPlugin.yaml bin/requirements.txt bin/run-provider.py PROVIDER_FILES += bin/pulumi-resource-${PACK}.cmd bin/pulumi-resource-${PACK} -build_provider:: bin/venv bin/${PACK}_provider ${PROVIDER_FILES} +build_provider:: bin/venv bin/${PACK}-provider ${PROVIDER_FILES} bin/venv: ${SRC}/requirements.txt rm -rf $@ python3 -m venv $@ ./bin/venv/bin/python -m pip install -r $< -bin/${PACK}_provider: ${SRC}/ ${SRC}/${PACK}_provider/VERSION +bin/${PACK}-provider: ${SRC}/ ${SRC}/${PACK_}_provider/VERSION rm -rf $@ - cp ${WORKING_DIR}/schema.json ${SRC}/${PACK}_provider/schema.json - ./bin/venv/bin/python -m pip install --no-deps provider/cmd/pulumi-resource-${PACK}/ -t bin/ + cp ${WORKING_DIR}/schema.json ${SRC}/${PACK_}_provider/schema.json + ./bin/venv/bin/python -m pip install --no-deps provider/cmd/pulumi-resource-${PACK}/ -t bin/ --upgrade bin/PulumiPlugin.yaml: ${SRC}/PulumiPlugin.yaml bin/requirements.txt: ${SRC}/requirements.txt @@ -49,79 +71,93 @@ bin/run-provider.py: ${SRC}/run-provider.py bin/%: cp -f $< $@ -${SRC}/${PACK}_provider/VERSION: - echo "${VERSION}" > ${SRC}/${PACK}_provider/VERSION +${SRC}/${PACK_}_provider/VERSION: + echo "${VERSION_GENERIC}" > ${SRC}/${PACK_}_provider/VERSION # Go SDK -gen_go_sdk: gen_sdk_prerequisites +gen_go_sdk: .pulumi/bin/pulumi rm -rf sdk/go - $(PULUMI) package gen-sdk ${SCHEMA_PATH} --language go + .pulumi/bin/pulumi package gen-sdk ${SCHEMA_PATH} --language go --version ${VERSION_GENERIC} +build_go_sdk:: +generate_go: gen_go_sdk # Required by CI +build_go: # Required by CI +install_go_sdk:: # Required by CI # .NET SDK -gen_dotnet_sdk: DOTNET_VERSION := $(shell pulumictl get version --language dotnet) -gen_dotnet_sdk: gen_sdk_prerequisites +gen_dotnet_sdk: .pulumi/bin/pulumi rm -rf sdk/dotnet - $(PULUMI) package gen-sdk ${SCHEMA_PATH} --language dotnet + .pulumi/bin/pulumi package gen-sdk ${SCHEMA_PATH} --language dotnet --version ${VERSION_GENERIC} build_dotnet_sdk:: DOTNET_VERSION := ${VERSION} build_dotnet_sdk:: gen_dotnet_sdk cd sdk/dotnet/ && \ echo "${DOTNET_VERSION}" >version.txt && \ - dotnet build /p:Version=${DOTNET_VERSION} + dotnet build -install_dotnet_sdk:: build_dotnet_sdk +install_dotnet_sdk:: rm -rf ${WORKING_DIR}/nuget mkdir -p ${WORKING_DIR}/nuget find . -name '*.nupkg' -print -exec cp -p {} ${WORKING_DIR}/nuget \; +generate_dotnet: gen_dotnet_sdk # Required by CI +build_dotnet: build_dotnet_sdk # Required by CI + # Node.js SDK -gen_nodejs_sdk: VERSION := $(shell pulumictl get version --language javascript) -gen_nodejs_sdk: gen_sdk_prerequisites +gen_nodejs_sdk: .pulumi/bin/pulumi rm -rf sdk/nodejs - $(PULUMI) package gen-sdk ${SCHEMA_PATH} --language nodejs + .pulumi/bin/pulumi package gen-sdk ${SCHEMA_PATH} --language nodejs --version ${VERSION_GENERIC} build_nodejs_sdk:: gen_nodejs_sdk cd sdk/nodejs/ && \ yarn install && \ yarn run tsc --version && \ yarn run tsc && \ - cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \ - sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json && \ - rm ./bin/package.json.bak + cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ +generate_nodejs: gen_nodejs_sdk # Required by CI +build_nodejs: build_nodejs_sdk # Required by CI install_nodejs_sdk:: build_nodejs_sdk + yarn unlink ${PACK} || true yarn link --cwd ${WORKING_DIR}/sdk/nodejs/bin # Python SDK -gen_python_sdk: PYPI_VERSION := $(shell pulumictl get version --language python) -gen_python_sdk: gen_sdk_prerequisites +gen_python_sdk: .pulumi/bin/pulumi rm -rf sdk/python - $(PULUMI) package gen-sdk ${SCHEMA_PATH} --language python + .pulumi/bin/pulumi package gen-sdk ${SCHEMA_PATH} --language python --version ${VERSION_GENERIC} cp ${WORKING_DIR}/README.md sdk/python - cp ${WORKING_DIR}/misc/pyproject.toml sdk/python -build_python_sdk:: PYPI_VERSION := $(shell pulumictl get version --language python) +build_python_sdk:: PYPI_VERSION := ${VERSION} build_python_sdk:: gen_python_sdk cd sdk/python/ && \ - printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \ rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \ - 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 . + cd ./bin && ../venv/bin/python -m build . + +generate_python: gen_python_sdk # Required by CI +build_python: build_python_sdk # Required by CI +install_python_sdk:: # Required by CI + +# Java SDK + +generate_java: # Required by CI + pulumi package gen-sdk ${SCHEMA_PATH} -o sdk --language java + cp ${WORKING_DIR}/README.md sdk/java +build_java: # Required by CI + cd sdk/java && gradle --console=plain build + +install_java_sdk: # Required by CI # Output tarballs for plugin distribution. Example use: # -# pulumi plugin install resource xyz 0.0.1 --file pulumi-resource-xyz-v0.0.1-linux-amd64.tar.gz +# pulumi plugin install resource lambda-builders 0.0.1 --file pulumi-resource-lambda-builders-v0.0.1-linux-amd64.tar.gz dist:: build_provider rm -rf dist @@ -131,20 +167,8 @@ dist:: build_provider cp dist/pulumi-resource-${PACK}-v${VERSION}-linux-amd64.tar.gz dist/pulumi-resource-${PACK}-v${VERSION}-darwin-arm64.tar.gz (cd bin && tar --gzip --exclude venv --exclude pulumi-resource-${PACK} -cf ../dist/pulumi-resource-${PACK}-v${VERSION}-windows-amd64.tar.gz .) - -# Keep the version of the pulumi binary used for code generation in sync with the version -# of the dependency used by this provider. - -$(PULUMI): HOME := $(WORKING_DIR) -$(PULUMI): provider/go.mod - @ PULUMI_VERSION="$$(cd provider && go list -m github.com/pulumi/pulumi/pkg/v3 | awk '{print $$2}')"; \ - if [ -x $(PULUMI) ]; then \ - CURRENT_VERSION="$$($(PULUMI) version)"; \ - if [ "$${CURRENT_VERSION}" != "$${PULUMI_VERSION}" ]; then \ - echo "Upgrading $(PULUMI) from $${CURRENT_VERSION} to $${PULUMI_VERSION}"; \ - rm $(PULUMI); \ - fi; \ - fi; \ - if ! [ -x $(PULUMI) ]; then \ - curl -fsSL https://get.pulumi.com | sh -s -- --version "$${PULUMI_VERSION#v}"; \ - fi +# Pulumi for codegen +.pulumi/bin/pulumi: PULUMI_VERSION := $(shell cat .pulumi.version) +.pulumi/bin/pulumi: HOME := $(WORKING_DIR) +.pulumi/bin/pulumi: .pulumi.version + curl -fsSL https://get.pulumi.com | sh -s -- -version "$(PULUMI_VERSION)" diff --git a/README.md b/README.md index 65a1ff5..30703db 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,8 @@ -# Pulumi Component Boilerplate (Python) +# Pulumi Lambda Builders -This repository builds a working Pulumi component in Python. You -can use it as a boilerplate for creating your own component provider by search-replacing `xyz` with your chosen name. - -### Background -This repository is part of the [guide for authoring and publishing a Pulumi Package](https://www.pulumi.com/docs/guides/pulumi-packages/how-to-author). - -Learn about the concepts behind [Pulumi Packages](https://www.pulumi.com/docs/guides/pulumi-packages/#pulumi-packages) and, more specifically, [Pulumi Components](https://www.pulumi.com/docs/intro/concepts/resources/components/) - -## Sample xyz Component Provider - -Pulumi component providers make -[component resources](https://www.pulumi.com/docs/intro/concepts/resources/#components) -available to Pulumi code in all supported programming languages. -Specifically, `xyz` component provider defines an example `StaticPage` -component resource that provisions a public AWS S3 HTML page. - -The important pieces include: - -- [schema.json](schema.json) declaring the `StaticPage` interface - -- [xyz_provider](provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py) package - implementing `StaticPage` using typical Pulumi Python code - -From here, the build generates: - -- SDKs for Python, Go, .NET, and Node (under `sdk/`) - -- `pulumi-resource-xyz` Pulumi plugin (under `bin/`) - -Users can deploy `StaticPage` instances in their language of choice, -as seen in the [TypeScript example](examples/simple/index.ts). Only -two things are needed to run `pulumi up`: - -- the code needs to reference the `xyz` SDK package - -- `pulumi-resource-xyz` needs to be on `PATH` for `pulumi` to find it +## Background +TODO ## Prerequisites @@ -48,19 +14,19 @@ two things are needed to run `pulumi up`: - Node.js (to build the Node SDK) - .NET Code SDK (to build the .NET SDK) - ## Build and Test -```bash - -# Regenerate SDKs +### Regenerate SDKs make generate -# Build and install the provider and SDKs +### Build and install the provider and SDKs make build make install -# Test Node.js SDK +### Ensure the pulumi-provider-xyz script is on PATH (for testing) +$ export PATH=$PATH:$PWD/bin + +### Test Node.js SDK $ cd examples/simple $ yarn install $ yarn link @pulumi/xyz @@ -68,76 +34,3 @@ $ pulumi stack init test $ pulumi config set aws:region us-east-1 $ pulumi up -``` - -## Naming - -The `xyz` plugin must be packaged as a `pulumi-resource-xyz` script or -binary (in the format `pulumi-resource-`). - -While the plugin must follow this naming convention, the SDK package -naming can be custom. - -## Packaging - -The `xyz` plugin can be packaged as a tarball for distribution: - -```bash -$ make dist - -$ ls dist/ -pulumi-resource-xyz-v0.0.1-darwin-amd64.tar.gz -pulumi-resource-xyz-v0.0.1-windows-amd64.tar.gz -pulumi-resource-xyz-v0.0.1-linux-amd64.tar.gz -``` - -Users can install the plugin with: - -```bash -pulumi plugin install resource xyz 0.0.1 --file dist/pulumi-resource-xyz-v0.0.1-darwin-amd64.tar.gz -``` - -The tarball only includes the `xyz_provider` sources. During the -installation phase, `pulumi` will use the user's system Python command -to rebuild a virtual environment and restore dependencies (such as -Pulumi SDK). - -TODO explain custom server hosting in more detail. - -## Configuring CI and releases - -1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md). - -## StaticPage Example - -### Schema - -The component resource's type [token](schema.json#L4) -is `xyz:index:StaticPage` in the -format of `::`. In this case, it's in the `xyz` -package and `index` module. This is the same type token passed inside -the implementation of `StaticPage` in -[staticpage.py](provider/cmd/pulumi-resource-xyz/xyz_provider/staticpage.py#L46), -and also the same token referenced in `construct` in -[provider.py](provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py#L36). - -This component has a required `indexContent` input property typed as -`string`, and two required output properties: `bucket` and -`websiteUrl`. Note that `bucket` is typed as the -`aws:s3/bucket:Bucket` resource from the `aws` provider (in the schema -the `/` is escaped as `%2F`). - -Since this component returns a type from the `aws` provider, each SDK -must reference the associated Pulumi `aws` SDK for the language. For -the .NET, Node.js, and Python SDKs, dependencies are specified in the -[language section](schema.json#31) of the schema. - -### Implementation - -The key method to implement is -[construct](provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py#L36) -on the `Provider` class. It receives `Inputs` representing arguments the user passed, -and returns a `ConstructResult` with the new StaticPage resource `urn` an state. - -It is important that the implementation aligns the structure of inptus -and outputs with the interface declared in `schema.json`. diff --git a/examples/simple/Pulumi.yaml b/examples/simple/Pulumi.yaml index 5d993d6..3a8fc00 100644 --- a/examples/simple/Pulumi.yaml +++ b/examples/simple/Pulumi.yaml @@ -1,9 +1,9 @@ name: simple runtime: nodejs -description: A simple xyz example +description: A simple lambda-builders example # While developing, instruct pulumi to find the xyz binary at this location. plugins: providers: - - name: xyz + - name: lambda-builders path: ../../bin diff --git a/examples/simple/index.ts b/examples/simple/index.ts index 9c397a0..9640b74 100644 --- a/examples/simple/index.ts +++ b/examples/simple/index.ts @@ -1,8 +1,2 @@ -import * as xyz from "@pulumi/xyz"; +import * as builders from "@pulumi/lambda-builders"; -const page = new xyz.StaticPage("page", { - indexContent: "

Hello world!

", -}); - -export const bucket = page.bucket; -export const url = page.websiteUrl; diff --git a/provider/cmd/pulumi-resource-xyz/.gitignore b/provider/cmd/pulumi-resource-lambda-builders/.gitignore similarity index 100% rename from provider/cmd/pulumi-resource-xyz/.gitignore rename to provider/cmd/pulumi-resource-lambda-builders/.gitignore diff --git a/provider/cmd/pulumi-resource-xyz/PulumiPlugin.yaml b/provider/cmd/pulumi-resource-lambda-builders/PulumiPlugin.yaml similarity index 100% rename from provider/cmd/pulumi-resource-xyz/PulumiPlugin.yaml rename to provider/cmd/pulumi-resource-lambda-builders/PulumiPlugin.yaml diff --git a/provider/cmd/pulumi-resource-xyz/xyz_provider/__init__.py b/provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/__init__.py similarity index 100% rename from provider/cmd/pulumi-resource-xyz/xyz_provider/__init__.py rename to provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/__init__.py diff --git a/provider/cmd/pulumi-resource-xyz/xyz_provider/__main__.py b/provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/__main__.py similarity index 80% rename from provider/cmd/pulumi-resource-xyz/xyz_provider/__main__.py rename to provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/__main__.py index dca8357..5e8634f 100644 --- a/provider/cmd/pulumi-resource-xyz/xyz_provider/__main__.py +++ b/provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/__main__.py @@ -17,8 +17,8 @@ import pulumi import pulumi.provider -import xyz_provider.provider +import lambda_builders_provider.provider -if __name__ == '__main__': - pulumi.provider.main(xyz_provider.provider.Provider(), sys.argv[1:]) +if __name__ == "__main__": + pulumi.provider.main(lambda_builders_provider.provider.Provider(), sys.argv[1:]) diff --git a/provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/provider.py b/provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/provider.py new file mode 100644 index 0000000..601fde1 --- /dev/null +++ b/provider/cmd/pulumi-resource-lambda-builders/lambda_builders_provider/provider.py @@ -0,0 +1,39 @@ +# Copyright 2016-2021, Pulumi Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Optional + +from pulumi import Inputs, ResourceOptions +from pulumi.provider import ConstructResult +import pulumi.provider as provider + +import lambda_builders_provider + + +class Provider(provider.Provider): + + def __init__(self) -> None: + super().__init__( + lambda_builders_provider.__version__, lambda_builders_provider.__schema__ + ) + + def construct( + self, + name: str, + resource_type: str, + inputs: Inputs, + options: Optional[ResourceOptions] = None, + ) -> ConstructResult: + + raise Exception(f"Unknown resource type {resource_type}") diff --git a/provider/cmd/pulumi-resource-xyz/pulumi-resource-xyz b/provider/cmd/pulumi-resource-lambda-builders/pulumi-resource-lambda-builders similarity index 100% rename from provider/cmd/pulumi-resource-xyz/pulumi-resource-xyz rename to provider/cmd/pulumi-resource-lambda-builders/pulumi-resource-lambda-builders diff --git a/provider/cmd/pulumi-resource-xyz/pulumi-resource-xyz.cmd b/provider/cmd/pulumi-resource-lambda-builders/pulumi-resource-lambda-builders.cmd similarity index 100% rename from provider/cmd/pulumi-resource-xyz/pulumi-resource-xyz.cmd rename to provider/cmd/pulumi-resource-lambda-builders/pulumi-resource-lambda-builders.cmd diff --git a/provider/cmd/pulumi-resource-lambda-builders/requirements.txt b/provider/cmd/pulumi-resource-lambda-builders/requirements.txt new file mode 100644 index 0000000..0fa9391 --- /dev/null +++ b/provider/cmd/pulumi-resource-lambda-builders/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0 +pulumi_aws>=6.0.0 diff --git a/provider/cmd/pulumi-resource-xyz/run-provider.py b/provider/cmd/pulumi-resource-lambda-builders/run-provider.py similarity index 77% rename from provider/cmd/pulumi-resource-xyz/run-provider.py rename to provider/cmd/pulumi-resource-lambda-builders/run-provider.py index c06d2d6..0c5c44c 100644 --- a/provider/cmd/pulumi-resource-xyz/run-provider.py +++ b/provider/cmd/pulumi-resource-lambda-builders/run-provider.py @@ -16,9 +16,9 @@ import sys import pulumi.provider -import xyz_provider -import xyz_provider.provider +import lambda_builders_provider +import lambda_builders_provider.provider -if __name__ == '__main__': - pulumi.provider.main(xyz_provider.provider.Provider(), sys.argv[1:]) +if __name__ == "__main__": + pulumi.provider.main(lambda_builders_provider.provider.Provider(), sys.argv[1:]) diff --git a/provider/cmd/pulumi-resource-lambda-builders/setup.py b/provider/cmd/pulumi-resource-lambda-builders/setup.py new file mode 100644 index 0000000..dc74560 --- /dev/null +++ b/provider/cmd/pulumi-resource-lambda-builders/setup.py @@ -0,0 +1,25 @@ +from distutils.core import setup +import os.path + + +PKG = "lambda_builders_provider" + + +def read_version(): + with open(os.path.join(os.path.dirname(__file__), PKG, "VERSION")) as version_file: + version = version_file.read().strip() + return version + + +setup( + name=PKG, + version=read_version(), + description="AWS Lambda Builders Pulumi Provider", + packages=[PKG], + package_data={PKG: ["py.typed", "VERSION", "schema.json"]}, + zip_safe=False, + install_requires=[ + "pulumi>=3.0.0", + "pulumi_aws>=6.0.0", + ], +) diff --git a/provider/cmd/pulumi-resource-xyz/requirements.txt b/provider/cmd/pulumi-resource-xyz/requirements.txt deleted file mode 100644 index 7aff08b..0000000 --- a/provider/cmd/pulumi-resource-xyz/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pulumi>=3.0.0 -pulumi_aws>=5.0.0 diff --git a/provider/cmd/pulumi-resource-xyz/setup.py b/provider/cmd/pulumi-resource-xyz/setup.py deleted file mode 100644 index 5411df3..0000000 --- a/provider/cmd/pulumi-resource-xyz/setup.py +++ /dev/null @@ -1,25 +0,0 @@ -from distutils.core import setup -import os.path - - -PKG = 'xyz_provider' - - -def read_version(): - with open(os.path.join(os.path.dirname(__file__), PKG, 'VERSION')) as version_file: - version = version_file.read().strip() - return version - - -setup( - name=PKG, - version=read_version(), - description='XYZ Pulumi Provider', - packages=[PKG], - package_data={PKG: ['py.typed', 'VERSION', 'schema.json']}, - zip_safe=False, - install_requires=[ - 'pulumi>=3.0.0', - 'pulumi_aws>=5.0.0', - ], -) diff --git a/provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py b/provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py deleted file mode 100644 index 17249ad..0000000 --- a/provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2016-2021, Pulumi Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import Optional - -from pulumi import Inputs, ResourceOptions -from pulumi.provider import ConstructResult -import pulumi.provider as provider - -import xyz_provider -from xyz_provider.staticpage import StaticPage, StaticPageArgs - - -class Provider(provider.Provider): - - def __init__(self) -> None: - super().__init__(xyz_provider.__version__, xyz_provider.__schema__) - - def construct(self, - name: str, - resource_type: str, - inputs: Inputs, - options: Optional[ResourceOptions] = None) -> ConstructResult: - - if resource_type == 'xyz:index:StaticPage': - return _construct_static_page(name, inputs, options) - - raise Exception(f'Unknown resource type {resource_type}') - - -def _construct_static_page(name: str, - inputs: Inputs, - options: Optional[ResourceOptions] = None) -> ConstructResult: - - # Create the component resource. - static_page = StaticPage(name, StaticPageArgs.from_inputs(inputs), dict(inputs), options) - - # Return the component resource's URN and outputs as its state. - return provider.ConstructResult( - urn=static_page.urn, - state={ - 'bucket': static_page.bucket, - 'websiteUrl': static_page.website_url - }) diff --git a/provider/cmd/pulumi-resource-xyz/xyz_provider/staticpage.py b/provider/cmd/pulumi-resource-xyz/xyz_provider/staticpage.py deleted file mode 100644 index 492fd27..0000000 --- a/provider/cmd/pulumi-resource-xyz/xyz_provider/staticpage.py +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 2016-2021, Pulumi Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json -from typing import Optional - -from pulumi import Inputs, ResourceOptions -from pulumi_aws import s3 -import pulumi - - -class StaticPageArgs: - - index_content: pulumi.Input[str] - """The HTML content for index.html.""" - - @staticmethod - def from_inputs(inputs: Inputs) -> 'StaticPageArgs': - return StaticPageArgs(index_content=inputs['indexContent']) - - def __init__(self, index_content: pulumi.Input[str]) -> None: - self.index_content = index_content - - -class StaticPage(pulumi.ComponentResource): - bucket: s3.Bucket - website_url: pulumi.Output[str] - - def __init__(self, - name: str, - args: StaticPageArgs, - props: Optional[dict] = None, - opts: Optional[ResourceOptions] = None) -> None: - - super().__init__('xyz:index:StaticPage', name, props, opts) - - # Create a bucket and expose a website index document. - bucket = s3.Bucket( - f'{name}-bucket', - website=s3.BucketWebsiteArgs(index_document='index.html'), - opts=ResourceOptions(parent=self)) - - # Create a bucket object for the index document. - s3.BucketObject( - f'{name}-index-object', - bucket=bucket.bucket, - key='index.html', - content=args.index_content, - content_type='text/html', - opts=ResourceOptions(parent=bucket)) - - # Set the access policy for the bucket so all objects are readable. - s3.BucketPolicy( - f'{name}-bucket-policy', - bucket=bucket.bucket, - policy=bucket.bucket.apply(_allow_getobject_policy), - opts=ResourceOptions(parent=bucket)) - - self.bucket = bucket - self.website_url = bucket.website_endpoint - - self.register_outputs({ - 'bucket': bucket, - 'websiteUrl': bucket.website_endpoint, - }) - - -def _allow_getobject_policy(bucket_name: str) -> str: - return json.dumps({ - 'Version': '2012-10-17', - 'Statement': [ - { - 'Effect': 'Allow', - 'Principal': '*', - 'Action': ['s3:GetObject'], - 'Resource': [ - f'arn:aws:s3:::{bucket_name}/*', # policy refers to bucket name explicitly - ], - }, - ], - }) diff --git a/provider/go.mod b/provider/go.mod index 066dc91..3190fdc 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -1,4 +1,4 @@ -module github.com/pulumi/pulumi-xyz +module github.com/pulumi/pulumi-lambda-builders go 1.21 diff --git a/schema.json b/schema.json index ce3d504..f3049ba 100644 --- a/schema.json +++ b/schema.json @@ -1,56 +1,29 @@ { - "name": "xyz", - "resources": { - "xyz:index:StaticPage": { - "isComponent": true, - "inputProperties": { - "indexContent": { - "type": "string", - "description": "The HTML content for index.html." - } - }, - "requiredInputs": [ - "indexContent" - ], - "properties": { - "bucket": { - "$ref": "/aws/v4.0.0/schema.json#/resources/aws:s3%2Fbucket:Bucket", - "description": "The bucket resource." - }, - "websiteUrl": { - "type": "string", - "description": "The website URL." - } - }, - "required": [ - "bucket", - "websiteUrl" - ] - } - }, + "name": "lambda-builders", + "resources": {}, "language": { "csharp": { "packageReferences": { "Pulumi": "3.*", - "Pulumi.Aws": "5.*" + "Pulumi.Aws": "6.*" } }, "go": { "generateResourceContainerTypes": true, - "importBasePath": "github.com/pulumi/pulumi-xyz/sdk/go/xyz" + "importBasePath": "github.com/pulumi/pulumi-lambda-builders/sdk/go/lambda-builders" }, "nodejs": { "dependencies": { - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { - "typescript": "^3.7.0" + "typescript": "^4.6.3" } }, "python": { "requires": { "pulumi": ">=3.0.0,<4.0.0", - "pulumi-aws": ">=5.0.0,<6.0.0" + "pulumi-aws": ">=6.0.0,<7.0.0" } } } diff --git a/sdk/dotnet/Provider.cs b/sdk/dotnet/Provider.cs index 7b5dc2a..bba82cf 100644 --- a/sdk/dotnet/Provider.cs +++ b/sdk/dotnet/Provider.cs @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** +// *** WARNING: this file was generated by pulumi. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; @@ -7,10 +7,10 @@ using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Xyz +namespace Pulumi.LambdaBuilders { - [XyzResourceType("pulumi:providers:xyz")] - public partial class Provider : Pulumi.ProviderResource + [LambdaBuildersResourceType("pulumi:providers:lambda-builders")] + public partial class Provider : global::Pulumi.ProviderResource { /// /// Create a Provider resource with the given unique name, arguments, and options. @@ -20,7 +20,7 @@ public partial class Provider : Pulumi.ProviderResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) - : base("xyz", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) + : base("lambda-builders", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) { } @@ -37,10 +37,11 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? } } - public sealed class ProviderArgs : Pulumi.ResourceArgs + public sealed class ProviderArgs : global::Pulumi.ResourceArgs { public ProviderArgs() { } + public static new ProviderArgs Empty => new ProviderArgs(); } } diff --git a/sdk/dotnet/Pulumi.Xyz.csproj b/sdk/dotnet/Pulumi.LambdaBuilders.csproj similarity index 90% rename from sdk/dotnet/Pulumi.Xyz.csproj rename to sdk/dotnet/Pulumi.LambdaBuilders.csproj index a24f335..62e4385 100644 --- a/sdk/dotnet/Pulumi.Xyz.csproj +++ b/sdk/dotnet/Pulumi.LambdaBuilders.csproj @@ -10,9 +10,8 @@ logo.png - netcoreapp3.1 + net6.0 enable - false @@ -39,14 +38,14 @@ - + - + diff --git a/sdk/dotnet/StaticPage.cs b/sdk/dotnet/StaticPage.cs deleted file mode 100644 index 44c1d7e..0000000 --- a/sdk/dotnet/StaticPage.cs +++ /dev/null @@ -1,65 +0,0 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Threading.Tasks; -using Pulumi.Serialization; - -namespace Pulumi.Xyz -{ - [XyzResourceType("xyz:index:StaticPage")] - public partial class StaticPage : Pulumi.ComponentResource - { - /// - /// The bucket resource. - /// - [Output("bucket")] - public Output Bucket { get; private set; } = null!; - - /// - /// The website URL. - /// - [Output("websiteUrl")] - public Output WebsiteUrl { get; private set; } = null!; - - - /// - /// Create a StaticPage resource with the given unique name, arguments, and options. - /// - /// - /// The unique name of the resource - /// The arguments used to populate this resource's properties - /// A bag of options that control this resource's behavior - public StaticPage(string name, StaticPageArgs args, ComponentResourceOptions? options = null) - : base("xyz:index:StaticPage", name, args ?? new StaticPageArgs(), MakeResourceOptions(options, ""), remote: true) - { - } - - private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input? id) - { - var defaultOptions = new ComponentResourceOptions - { - Version = Utilities.Version, - }; - var merged = ComponentResourceOptions.Merge(defaultOptions, options); - // Override the ID if one was specified for consistency with other language SDKs. - merged.Id = id ?? merged.Id; - return merged; - } - } - - public sealed class StaticPageArgs : Pulumi.ResourceArgs - { - /// - /// The HTML content for index.html. - /// - [Input("indexContent", required: true)] - public Input IndexContent { get; set; } = null!; - - public StaticPageArgs() - { - } - } -} diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index acca44b..c7d885b 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -1,7 +1,7 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** +// *** WARNING: this file was generated by pulumi. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** -namespace Pulumi.Xyz +namespace Pulumi.LambdaBuilders { static class Utilities { @@ -62,7 +62,7 @@ static class Utilities static Utilities() { var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly; - using var stream = assembly.GetManifestResourceStream("Pulumi.Xyz.version.txt"); + using var stream = assembly.GetManifestResourceStream("Pulumi.LambdaBuilders.version.txt"); using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file")); version = reader.ReadToEnd().Trim(); var parts = version.Split("\n"); @@ -74,9 +74,9 @@ static Utilities() } } - internal sealed class XyzResourceTypeAttribute : Pulumi.ResourceTypeAttribute + internal sealed class LambdaBuildersResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute { - public XyzResourceTypeAttribute(string type) : base(type, Utilities.Version) + public LambdaBuildersResourceTypeAttribute(string type) : base(type, Utilities.Version) { } } diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index 3baacc8..af99269 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,4 +1,4 @@ { "resource": true, - "name": "xyz" + "name": "lambda-builders" } diff --git a/sdk/go.mod b/sdk/go.mod deleted file mode 100644 index a5c45b2..0000000 --- a/sdk/go.mod +++ /dev/null @@ -1,58 +0,0 @@ -module github.com/pulumi/pulumi-xyz/sdk - -go 1.21 - -require ( - github.com/blang/semver v3.5.1+incompatible - github.com/pkg/errors v0.9.1 - github.com/pulumi/pulumi-aws/sdk/v5 v6.37.0 - github.com/pulumi/pulumi/sdk/v3 v3.116.1 -) - -require ( - github.com/cheggaaa/pb v1.0.18 // indirect - github.com/djherbis/times v1.2.0 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/gofrs/uuid v3.3.0+incompatible // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect - github.com/hashicorp/go-multierror v1.0.0 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect - github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/opentracing/basictracer-go v1.0.0 // indirect - github.com/opentracing/opentracing-go v1.1.0 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.8.1 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect - github.com/sergi/go-diff v1.1.0 // indirect - github.com/spf13/cobra v1.4.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/src-d/gcfg v1.4.0 // indirect - github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect - github.com/uber/jaeger-client-go v2.22.1+incompatible // indirect - github.com/uber/jaeger-lib v2.2.0+incompatible // indirect - github.com/xanzy/ssh-agent v0.2.1 // indirect - go.uber.org/atomic v1.6.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.3 // indirect - google.golang.org/protobuf v1.33.0 // indirect - gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect - gopkg.in/src-d/go-git.v4 v4.13.1 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect -) diff --git a/sdk/go.sum b/sdk/go.sum deleted file mode 100644 index 26d8c54..0000000 --- a/sdk/go.sum +++ /dev/null @@ -1,390 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cheggaaa/pb v1.0.18 h1:G/DgkKaBP0V5lnBg/vx61nVxxAU+VqU5yMzSc0f2PPE= -github.com/cheggaaa/pb v1.0.18/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/djherbis/times v1.2.0 h1:xANXjsC/iBqbO00vkWlYwPWgBgEVU6m6AFYg0Pic+Mc= -github.com/djherbis/times v1.2.0/go.mod h1:CGMZlo255K5r4Yw0b9RRfFQpM2y7uOmxg4jm9HsaVf8= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0= -github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= -github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pulumi/pulumi-aws/sdk/v5 v5.3.0 h1:be0qFqKpS38eERDYDGRVJ/uX95CdV2u/by9aCP88c5U= -github.com/pulumi/pulumi-aws/sdk/v5 v5.3.0/go.mod h1:5Bl3enkEyJD5oDkNZYfduZP7aP3xFjCf7yaBdNuifEo= -github.com/pulumi/pulumi/sdk/v3 v3.25.0/go.mod h1:VsxW+TGv2VBLe/MeqsAr9r0zKzK/gbAhFT9QxYr24cY= -github.com/pulumi/pulumi/sdk/v3 v3.31.0 h1:ReDLFH9cK4IswssO43Bb+he4YQV2g0OVu2tQS2sCkho= -github.com/pulumi/pulumi/sdk/v3 v3.31.0/go.mod h1:hGo/+AL1L4sPL9Ukd/i5bNFM3WHs3dHcA+GKEW7M3RA= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0= -github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= -github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 h1:9VTskZOIRf2vKF3UL8TuWElry5pgUpV1tFSe/e/0m/E= -github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= -github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM= -github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= -github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200608174601-1b747fd94509/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= -gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= -gopkg.in/src-d/go-git-fixtures.v3 v3.5.0 h1:ivZFOIltbce2Mo8IjzUHAFoq/IylO9WHhNOAJK+LsJg= -gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= -gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= -gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= -pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/sdk/go/lambda-builders/doc.go b/sdk/go/lambda-builders/doc.go new file mode 100644 index 0000000..a754f81 --- /dev/null +++ b/sdk/go/lambda-builders/doc.go @@ -0,0 +1,2 @@ +// Package lambdabuilders exports types, functions, subpackages for provisioning lambdabuilders resources. +package lambdabuilders diff --git a/sdk/go/lambda-builders/init.go b/sdk/go/lambda-builders/init.go new file mode 100644 index 0000000..6c3c850 --- /dev/null +++ b/sdk/go/lambda-builders/init.go @@ -0,0 +1,41 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package lambdabuilders + +import ( + "fmt" + + "github.com/blang/semver" + "github.com/pulumi/pulumi-lambda-builders/sdk/go/lambda-builders/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type pkg struct { + version semver.Version +} + +func (p *pkg) Version() semver.Version { + return p.version +} + +func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { + if typ != "pulumi:providers:lambda-builders" { + return nil, fmt.Errorf("unknown provider type: %s", typ) + } + + r := &Provider{} + err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) + return r, err +} + +func init() { + version, err := internal.PkgVersion() + if err != nil { + version = semver.Version{Major: 1} + } + pulumi.RegisterResourcePackage( + "lambda-builders", + &pkg{version}, + ) +} diff --git a/sdk/go/lambda-builders/internal/pulumiUtilities.go b/sdk/go/lambda-builders/internal/pulumiUtilities.go new file mode 100644 index 0000000..2fb2310 --- /dev/null +++ b/sdk/go/lambda-builders/internal/pulumiUtilities.go @@ -0,0 +1,184 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package internal + +import ( + "fmt" + "os" + "reflect" + "regexp" + "strconv" + "strings" + + "github.com/blang/semver" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/internals" +) + +type envParser func(v string) interface{} + +func ParseEnvBool(v string) interface{} { + b, err := strconv.ParseBool(v) + if err != nil { + return nil + } + return b +} + +func ParseEnvInt(v string) interface{} { + i, err := strconv.ParseInt(v, 0, 0) + if err != nil { + return nil + } + return int(i) +} + +func ParseEnvFloat(v string) interface{} { + f, err := strconv.ParseFloat(v, 64) + if err != nil { + return nil + } + return f +} + +func ParseEnvStringArray(v string) interface{} { + var result pulumi.StringArray + for _, item := range strings.Split(v, ";") { + result = append(result, pulumi.String(item)) + } + return result +} + +func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { + for _, v := range vars { + if value, ok := os.LookupEnv(v); ok { + if parser != nil { + return parser(value) + } + return value + } + } + return def +} + +// PkgVersion uses reflection to determine the version of the current package. +// If a version cannot be determined, v1 will be assumed. The second return +// value is always nil. +func PkgVersion() (semver.Version, error) { + // emptyVersion defaults to v0.0.0 + if !SdkVersion.Equals(semver.Version{}) { + return SdkVersion, nil + } + type sentinal struct{} + pkgPath := reflect.TypeOf(sentinal{}).PkgPath() + re := regexp.MustCompile("^.*/pulumi-lambda-builders/sdk(/v\\d+)?") + if match := re.FindStringSubmatch(pkgPath); match != nil { + vStr := match[1] + if len(vStr) == 0 { // If the version capture group was empty, default to v1. + return semver.Version{Major: 1}, nil + } + return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil + } + return semver.Version{Major: 1}, nil +} + +// isZero is a null safe check for if a value is it's types zero value. +func IsZero(v interface{}) bool { + if v == nil { + return true + } + return reflect.ValueOf(v).IsZero() +} + +func CallPlain( + ctx *pulumi.Context, + tok string, + args pulumi.Input, + output pulumi.Output, + self pulumi.Resource, + property string, + resultPtr reflect.Value, + errorPtr *error, + opts ...pulumi.InvokeOption, +) { + res, err := callPlainInner(ctx, tok, args, output, self, opts...) + if err != nil { + *errorPtr = err + return + } + + v := reflect.ValueOf(res) + + // extract res.property field if asked to do so + if property != "" { + v = v.FieldByName("Res") + } + + // return by setting the result pointer; this style of returns shortens the generated code without generics + resultPtr.Elem().Set(v) +} + +func callPlainInner( + ctx *pulumi.Context, + tok string, + args pulumi.Input, + output pulumi.Output, + self pulumi.Resource, + opts ...pulumi.InvokeOption, +) (any, error) { + o, err := ctx.Call(tok, args, output, self, opts...) + if err != nil { + return nil, err + } + + outputData, err := internals.UnsafeAwaitOutput(ctx.Context(), o) + if err != nil { + return nil, err + } + + // Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency. + known := outputData.Known + value := outputData.Value + secret := outputData.Secret + + problem := "" + if !known { + problem = "an unknown value" + } else if secret { + problem = "a secret value" + } + + if problem != "" { + return nil, fmt.Errorf("Plain resource method %q incorrectly returned %s. "+ + "This is an error in the provider, please report this to the provider developer.", + tok, problem) + } + + return value, nil +} + +// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. +func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { + defaults := []pulumi.ResourceOption{} + + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } + return append(defaults, opts...) +} + +// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. +func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { + defaults := []pulumi.InvokeOption{} + + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } + return append(defaults, opts...) +} diff --git a/sdk/go/lambda-builders/internal/pulumiVersion.go b/sdk/go/lambda-builders/internal/pulumiVersion.go new file mode 100644 index 0000000..4ad7cb8 --- /dev/null +++ b/sdk/go/lambda-builders/internal/pulumiVersion.go @@ -0,0 +1,11 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package internal + +import ( + "github.com/blang/semver" +) + +var SdkVersion semver.Version = semver.Version{} +var pluginDownloadURL string = "" diff --git a/sdk/go/xyz/provider.go b/sdk/go/lambda-builders/provider.go similarity index 85% rename from sdk/go/xyz/provider.go rename to sdk/go/lambda-builders/provider.go index 7bcb99c..260389a 100644 --- a/sdk/go/xyz/provider.go +++ b/sdk/go/lambda-builders/provider.go @@ -1,12 +1,13 @@ -// Code generated by Pulumi SDK Generator DO NOT EDIT. +// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** -package xyz +package lambdabuilders import ( "context" "reflect" + "github.com/pulumi/pulumi-lambda-builders/sdk/go/lambda-builders/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -21,8 +22,9 @@ func NewProvider(ctx *pulumi.Context, args = &ProviderArgs{} } + opts = internal.PkgResourceDefaultOpts(opts) var resource Provider - err := ctx.RegisterResource("pulumi:providers:xyz", name, args, &resource, opts...) + err := ctx.RegisterResource("pulumi:providers:lambda-builders", name, args, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/lambda-builders/pulumi-plugin.json b/sdk/go/lambda-builders/pulumi-plugin.json new file mode 100644 index 0000000..af99269 --- /dev/null +++ b/sdk/go/lambda-builders/pulumi-plugin.json @@ -0,0 +1,4 @@ +{ + "resource": true, + "name": "lambda-builders" +} diff --git a/sdk/go/xyz/doc.go b/sdk/go/xyz/doc.go deleted file mode 100644 index 5e0ed71..0000000 --- a/sdk/go/xyz/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package xyz exports types, functions, subpackages for provisioning xyz resources. -package xyz diff --git a/sdk/go/xyz/init.go b/sdk/go/xyz/init.go deleted file mode 100644 index f2db0e4..0000000 --- a/sdk/go/xyz/init.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by Pulumi SDK Generator DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package xyz - -import ( - "fmt" - - "github.com/blang/semver" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -type module struct { - version semver.Version -} - -func (m *module) Version() semver.Version { - return m.version -} - -func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { - switch typ { - case "xyz:index:StaticPage": - r = &StaticPage{} - default: - return nil, fmt.Errorf("unknown resource type: %s", typ) - } - - err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) - return -} - -type pkg struct { - version semver.Version -} - -func (p *pkg) Version() semver.Version { - return p.version -} - -func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { - if typ != "pulumi:providers:xyz" { - return nil, fmt.Errorf("unknown provider type: %s", typ) - } - - r := &Provider{} - err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) - return r, err -} - -func init() { - version, _ := PkgVersion() - pulumi.RegisterResourceModule( - "xyz", - "index", - &module{version}, - ) - pulumi.RegisterResourcePackage( - "xyz", - &pkg{version}, - ) -} diff --git a/sdk/go/xyz/pulumi-plugin.json b/sdk/go/xyz/pulumi-plugin.json deleted file mode 100644 index 3baacc8..0000000 --- a/sdk/go/xyz/pulumi-plugin.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "resource": true, - "name": "xyz" -} diff --git a/sdk/go/xyz/pulumiUtilities.go b/sdk/go/xyz/pulumiUtilities.go deleted file mode 100644 index bc1d5e0..0000000 --- a/sdk/go/xyz/pulumiUtilities.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by Pulumi SDK Generator DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package xyz - -import ( - "fmt" - "os" - "reflect" - "regexp" - "strconv" - "strings" - - "github.com/blang/semver" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -type envParser func(v string) interface{} - -func parseEnvBool(v string) interface{} { - b, err := strconv.ParseBool(v) - if err != nil { - return nil - } - return b -} - -func parseEnvInt(v string) interface{} { - i, err := strconv.ParseInt(v, 0, 0) - if err != nil { - return nil - } - return int(i) -} - -func parseEnvFloat(v string) interface{} { - f, err := strconv.ParseFloat(v, 64) - if err != nil { - return nil - } - return f -} - -func parseEnvStringArray(v string) interface{} { - var result pulumi.StringArray - for _, item := range strings.Split(v, ";") { - result = append(result, pulumi.String(item)) - } - return result -} - -func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { - for _, v := range vars { - if value := os.Getenv(v); value != "" { - if parser != nil { - return parser(value) - } - return value - } - } - return def -} - -// PkgVersion uses reflection to determine the version of the current package. -// If a version cannot be determined, v1 will be assumed. The second return -// value is always nil. -func PkgVersion() (semver.Version, error) { - type sentinal struct{} - pkgPath := reflect.TypeOf(sentinal{}).PkgPath() - re := regexp.MustCompile("^.*/pulumi-xyz/sdk(/v\\d+)?") - if match := re.FindStringSubmatch(pkgPath); match != nil { - vStr := match[1] - if len(vStr) == 0 { // If the version capture group was empty, default to v1. - return semver.Version{Major: 1}, nil - } - return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil - } - return semver.Version{Major: 1}, nil -} - -// isZero is a null safe check for if a value is it's types zero value. -func isZero(v interface{}) bool { - if v == nil { - return true - } - return reflect.ValueOf(v).IsZero() -} diff --git a/sdk/go/xyz/staticPage.go b/sdk/go/xyz/staticPage.go deleted file mode 100644 index a26d6f7..0000000 --- a/sdk/go/xyz/staticPage.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by Pulumi SDK Generator DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package xyz - -import ( - "context" - "reflect" - - "github.com/pkg/errors" - "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/s3" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -type StaticPage struct { - pulumi.ResourceState - - // The bucket resource. - Bucket s3.BucketOutput `pulumi:"bucket"` - // The website URL. - WebsiteUrl pulumi.StringOutput `pulumi:"websiteUrl"` -} - -// NewStaticPage registers a new resource with the given unique name, arguments, and options. -func NewStaticPage(ctx *pulumi.Context, - name string, args *StaticPageArgs, opts ...pulumi.ResourceOption) (*StaticPage, error) { - if args == nil { - return nil, errors.New("missing one or more required arguments") - } - - if args.IndexContent == nil { - return nil, errors.New("invalid value for required argument 'IndexContent'") - } - var resource StaticPage - err := ctx.RegisterRemoteComponentResource("xyz:index:StaticPage", name, args, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -type staticPageArgs struct { - // The HTML content for index.html. - IndexContent string `pulumi:"indexContent"` -} - -// The set of arguments for constructing a StaticPage resource. -type StaticPageArgs struct { - // The HTML content for index.html. - IndexContent pulumi.StringInput -} - -func (StaticPageArgs) ElementType() reflect.Type { - return reflect.TypeOf((*staticPageArgs)(nil)).Elem() -} - -type StaticPageInput interface { - pulumi.Input - - ToStaticPageOutput() StaticPageOutput - ToStaticPageOutputWithContext(ctx context.Context) StaticPageOutput -} - -func (*StaticPage) ElementType() reflect.Type { - return reflect.TypeOf((**StaticPage)(nil)).Elem() -} - -func (i *StaticPage) ToStaticPageOutput() StaticPageOutput { - return i.ToStaticPageOutputWithContext(context.Background()) -} - -func (i *StaticPage) ToStaticPageOutputWithContext(ctx context.Context) StaticPageOutput { - return pulumi.ToOutputWithContext(ctx, i).(StaticPageOutput) -} - -// StaticPageArrayInput is an input type that accepts StaticPageArray and StaticPageArrayOutput values. -// You can construct a concrete instance of `StaticPageArrayInput` via: -// -// StaticPageArray{ StaticPageArgs{...} } -type StaticPageArrayInput interface { - pulumi.Input - - ToStaticPageArrayOutput() StaticPageArrayOutput - ToStaticPageArrayOutputWithContext(context.Context) StaticPageArrayOutput -} - -type StaticPageArray []StaticPageInput - -func (StaticPageArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]*StaticPage)(nil)).Elem() -} - -func (i StaticPageArray) ToStaticPageArrayOutput() StaticPageArrayOutput { - return i.ToStaticPageArrayOutputWithContext(context.Background()) -} - -func (i StaticPageArray) ToStaticPageArrayOutputWithContext(ctx context.Context) StaticPageArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(StaticPageArrayOutput) -} - -// StaticPageMapInput is an input type that accepts StaticPageMap and StaticPageMapOutput values. -// You can construct a concrete instance of `StaticPageMapInput` via: -// -// StaticPageMap{ "key": StaticPageArgs{...} } -type StaticPageMapInput interface { - pulumi.Input - - ToStaticPageMapOutput() StaticPageMapOutput - ToStaticPageMapOutputWithContext(context.Context) StaticPageMapOutput -} - -type StaticPageMap map[string]StaticPageInput - -func (StaticPageMap) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*StaticPage)(nil)).Elem() -} - -func (i StaticPageMap) ToStaticPageMapOutput() StaticPageMapOutput { - return i.ToStaticPageMapOutputWithContext(context.Background()) -} - -func (i StaticPageMap) ToStaticPageMapOutputWithContext(ctx context.Context) StaticPageMapOutput { - return pulumi.ToOutputWithContext(ctx, i).(StaticPageMapOutput) -} - -type StaticPageOutput struct{ *pulumi.OutputState } - -func (StaticPageOutput) ElementType() reflect.Type { - return reflect.TypeOf((**StaticPage)(nil)).Elem() -} - -func (o StaticPageOutput) ToStaticPageOutput() StaticPageOutput { - return o -} - -func (o StaticPageOutput) ToStaticPageOutputWithContext(ctx context.Context) StaticPageOutput { - return o -} - -type StaticPageArrayOutput struct{ *pulumi.OutputState } - -func (StaticPageArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]*StaticPage)(nil)).Elem() -} - -func (o StaticPageArrayOutput) ToStaticPageArrayOutput() StaticPageArrayOutput { - return o -} - -func (o StaticPageArrayOutput) ToStaticPageArrayOutputWithContext(ctx context.Context) StaticPageArrayOutput { - return o -} - -func (o StaticPageArrayOutput) Index(i pulumi.IntInput) StaticPageOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StaticPage { - return vs[0].([]*StaticPage)[vs[1].(int)] - }).(StaticPageOutput) -} - -type StaticPageMapOutput struct{ *pulumi.OutputState } - -func (StaticPageMapOutput) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*StaticPage)(nil)).Elem() -} - -func (o StaticPageMapOutput) ToStaticPageMapOutput() StaticPageMapOutput { - return o -} - -func (o StaticPageMapOutput) ToStaticPageMapOutputWithContext(ctx context.Context) StaticPageMapOutput { - return o -} - -func (o StaticPageMapOutput) MapIndex(k pulumi.StringInput) StaticPageOutput { - return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StaticPage { - return vs[0].(map[string]*StaticPage)[vs[1].(string)] - }).(StaticPageOutput) -} - -func init() { - pulumi.RegisterInputType(reflect.TypeOf((*StaticPageInput)(nil)).Elem(), &StaticPage{}) - pulumi.RegisterInputType(reflect.TypeOf((*StaticPageArrayInput)(nil)).Elem(), StaticPageArray{}) - pulumi.RegisterInputType(reflect.TypeOf((*StaticPageMapInput)(nil)).Elem(), StaticPageMap{}) - pulumi.RegisterOutputType(StaticPageOutput{}) - pulumi.RegisterOutputType(StaticPageArrayOutput{}) - pulumi.RegisterOutputType(StaticPageMapOutput{}) -} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index dda83cc..3625b0e 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -1,35 +1,19 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; // Export members: -export * from "./provider"; -export * from "./staticPage"; +export { ProviderArgs } from "./provider"; +export type Provider = import("./provider").Provider; +export const Provider: typeof import("./provider").Provider = null as any; +utilities.lazyLoad(exports, ["Provider"], () => require("./provider")); -// Import resources to register: -import { StaticPage } from "./staticPage"; - -const _module = { - version: utilities.getVersion(), - construct: (name: string, type: string, urn: string): pulumi.Resource => { - switch (type) { - case "xyz:index:StaticPage": - return new StaticPage(name, undefined, { urn }) - default: - throw new Error(`unknown resource type ${type}`); - } - }, -}; -pulumi.runtime.registerResourceModule("xyz", "index", _module) - -import { Provider } from "./provider"; - -pulumi.runtime.registerResourcePackage("xyz", { +pulumi.runtime.registerResourcePackage("lambda-builders", { version: utilities.getVersion(), constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { - if (type !== "pulumi:providers:xyz") { + if (type !== "pulumi:providers:lambda-builders") { throw new Error(`unknown provider type ${type}`); } return new Provider(name, undefined, { urn }); diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 1285c26..53abe8a 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,20 +1,19 @@ { - "name": "@pulumi/xyz", + "name": "@pulumi/lambda-builders", "version": "${VERSION}", "scripts": { - "build": "tsc", - "install": "node scripts/install-pulumi-plugin.js resource xyz ${VERSION}" + "build": "tsc" }, "dependencies": { - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0", + "@pulumi/pulumi": "^3.42.0" }, "devDependencies": { - "typescript": "^3.7.0" - }, - "peerDependencies": { - "@pulumi/pulumi": "latest" + "@types/node": "^14", + "typescript": "^4.6.3" }, "pulumi": { - "resource": true + "resource": true, + "name": "lambda-builders" } } diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index dac7201..d144ca7 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -1,4 +1,4 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; @@ -6,7 +6,7 @@ import * as utilities from "./utilities"; export class Provider extends pulumi.ProviderResource { /** @internal */ - public static readonly __pulumiType = 'xyz'; + public static readonly __pulumiType = 'lambda-builders'; /** * Returns true if the given object is an instance of Provider. This is designed to work even @@ -16,7 +16,7 @@ export class Provider extends pulumi.ProviderResource { if (obj === undefined || obj === null) { return false; } - return obj['__pulumiType'] === Provider.__pulumiType; + return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; } diff --git a/sdk/nodejs/scripts/install-pulumi-plugin.js b/sdk/nodejs/scripts/install-pulumi-plugin.js deleted file mode 100644 index fefc6e0..0000000 --- a/sdk/nodejs/scripts/install-pulumi-plugin.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var childProcess = require("child_process"); - -var args = process.argv.slice(2); - -if (args.indexOf("${VERSION}") !== -1) { - process.exit(0); -} - -var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), { - stdio: ["ignore", "inherit", "inherit"] -}); - -if (res.error && res.error.code === "ENOENT") { - console.error("\nThere was an error installing the resource provider plugin. " + - "It looks like `pulumi` is not installed on your system. " + - "Please visit https://pulumi.com/ to install the Pulumi CLI.\n" + - "You may try manually installing the plugin by running " + - "`pulumi plugin install " + args.join(" ") + "`"); -} else if (res.error || res.status !== 0) { - console.error("\nThere was an error installing the resource provider plugin. " + - "You may try to manually installing the plugin by running " + - "`pulumi plugin install " + args.join(" ") + "`"); -} - -process.exit(0); diff --git a/sdk/nodejs/staticPage.ts b/sdk/nodejs/staticPage.ts deleted file mode 100644 index ed533eb..0000000 --- a/sdk/nodejs/staticPage.ts +++ /dev/null @@ -1,67 +0,0 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -import * as pulumi from "@pulumi/pulumi"; -import * as utilities from "./utilities"; - -import * as pulumiAws from "@pulumi/aws"; - -export class StaticPage extends pulumi.ComponentResource { - /** @internal */ - public static readonly __pulumiType = 'xyz:index:StaticPage'; - - /** - * Returns true if the given object is an instance of StaticPage. This is designed to work even - * when multiple copies of the Pulumi SDK have been loaded into the same process. - */ - public static isInstance(obj: any): obj is StaticPage { - if (obj === undefined || obj === null) { - return false; - } - return obj['__pulumiType'] === StaticPage.__pulumiType; - } - - /** - * The bucket resource. - */ - public /*out*/ readonly bucket!: pulumi.Output; - /** - * The website URL. - */ - public /*out*/ readonly websiteUrl!: pulumi.Output; - - /** - * Create a StaticPage resource with the given unique name, arguments, and options. - * - * @param name The _unique_ name of the resource. - * @param args The arguments to use to populate this resource's properties. - * @param opts A bag of options that control this resource's behavior. - */ - constructor(name: string, args: StaticPageArgs, opts?: pulumi.ComponentResourceOptions) { - let resourceInputs: pulumi.Inputs = {}; - opts = opts || {}; - if (!opts.id) { - if ((!args || args.indexContent === undefined) && !opts.urn) { - throw new Error("Missing required property 'indexContent'"); - } - resourceInputs["indexContent"] = args ? args.indexContent : undefined; - resourceInputs["bucket"] = undefined /*out*/; - resourceInputs["websiteUrl"] = undefined /*out*/; - } else { - resourceInputs["bucket"] = undefined /*out*/; - resourceInputs["websiteUrl"] = undefined /*out*/; - } - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - super(StaticPage.__pulumiType, name, resourceInputs, opts, true /*remote*/); - } -} - -/** - * The set of arguments for constructing a StaticPage resource. - */ -export interface StaticPageArgs { - /** - * The HTML content for index.html. - */ - indexContent: pulumi.Input; -} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 5bce5f4..730ed52 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -15,7 +15,6 @@ "files": [ "index.ts", "provider.ts", - "staticPage.ts", "utilities.ts" ] } diff --git a/sdk/nodejs/utilities.ts b/sdk/nodejs/utilities.ts index 5df64c4..fb0d823 100644 --- a/sdk/nodejs/utilities.ts +++ b/sdk/nodejs/utilities.ts @@ -1,7 +1,10 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** +// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** +import * as runtime from "@pulumi/pulumi/runtime"; +import * as pulumi from "@pulumi/pulumi"; + export function getEnv(...vars: string[]): string | undefined { for (const v of vars) { const value = process.env[v]; @@ -52,3 +55,41 @@ export function getVersion(): string { export function resourceOptsDefaults(): any { return { version: getVersion() }; } + +/** @internal */ +export function lazyLoad(exports: any, props: string[], loadModule: any) { + for (let property of props) { + Object.defineProperty(exports, property, { + enumerable: true, + get: function() { + return loadModule()[property]; + }, + }); + } +} + +export async function callAsync( + tok: string, + props: pulumi.Inputs, + res?: pulumi.Resource, + opts?: {property?: string}, +): Promise { + const o: any = runtime.call(tok, props, res); + const value = await o.promise(true /*withUnknowns*/); + const isKnown = await o.isKnown; + const isSecret = await o.isSecret; + const problem: string|undefined = + !isKnown ? "an unknown value" + : isSecret ? "a secret value" + : undefined; + // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency. + if (problem) { + throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` + + "This is an error in the provider, please report this to the provider developer."); + } + // Extract a single property if requested. + if (opts && opts.property) { + return value[opts.property]; + } + return value; +} diff --git a/sdk/python/README.md b/sdk/python/README.md index 65a1ff5..30703db 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -1,42 +1,8 @@ -# Pulumi Component Boilerplate (Python) +# Pulumi Lambda Builders -This repository builds a working Pulumi component in Python. You -can use it as a boilerplate for creating your own component provider by search-replacing `xyz` with your chosen name. - -### Background -This repository is part of the [guide for authoring and publishing a Pulumi Package](https://www.pulumi.com/docs/guides/pulumi-packages/how-to-author). - -Learn about the concepts behind [Pulumi Packages](https://www.pulumi.com/docs/guides/pulumi-packages/#pulumi-packages) and, more specifically, [Pulumi Components](https://www.pulumi.com/docs/intro/concepts/resources/components/) - -## Sample xyz Component Provider - -Pulumi component providers make -[component resources](https://www.pulumi.com/docs/intro/concepts/resources/#components) -available to Pulumi code in all supported programming languages. -Specifically, `xyz` component provider defines an example `StaticPage` -component resource that provisions a public AWS S3 HTML page. - -The important pieces include: - -- [schema.json](schema.json) declaring the `StaticPage` interface - -- [xyz_provider](provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py) package - implementing `StaticPage` using typical Pulumi Python code - -From here, the build generates: - -- SDKs for Python, Go, .NET, and Node (under `sdk/`) - -- `pulumi-resource-xyz` Pulumi plugin (under `bin/`) - -Users can deploy `StaticPage` instances in their language of choice, -as seen in the [TypeScript example](examples/simple/index.ts). Only -two things are needed to run `pulumi up`: - -- the code needs to reference the `xyz` SDK package - -- `pulumi-resource-xyz` needs to be on `PATH` for `pulumi` to find it +## Background +TODO ## Prerequisites @@ -48,19 +14,19 @@ two things are needed to run `pulumi up`: - Node.js (to build the Node SDK) - .NET Code SDK (to build the .NET SDK) - ## Build and Test -```bash - -# Regenerate SDKs +### Regenerate SDKs make generate -# Build and install the provider and SDKs +### Build and install the provider and SDKs make build make install -# Test Node.js SDK +### Ensure the pulumi-provider-xyz script is on PATH (for testing) +$ export PATH=$PATH:$PWD/bin + +### Test Node.js SDK $ cd examples/simple $ yarn install $ yarn link @pulumi/xyz @@ -68,76 +34,3 @@ $ pulumi stack init test $ pulumi config set aws:region us-east-1 $ pulumi up -``` - -## Naming - -The `xyz` plugin must be packaged as a `pulumi-resource-xyz` script or -binary (in the format `pulumi-resource-`). - -While the plugin must follow this naming convention, the SDK package -naming can be custom. - -## Packaging - -The `xyz` plugin can be packaged as a tarball for distribution: - -```bash -$ make dist - -$ ls dist/ -pulumi-resource-xyz-v0.0.1-darwin-amd64.tar.gz -pulumi-resource-xyz-v0.0.1-windows-amd64.tar.gz -pulumi-resource-xyz-v0.0.1-linux-amd64.tar.gz -``` - -Users can install the plugin with: - -```bash -pulumi plugin install resource xyz 0.0.1 --file dist/pulumi-resource-xyz-v0.0.1-darwin-amd64.tar.gz -``` - -The tarball only includes the `xyz_provider` sources. During the -installation phase, `pulumi` will use the user's system Python command -to rebuild a virtual environment and restore dependencies (such as -Pulumi SDK). - -TODO explain custom server hosting in more detail. - -## Configuring CI and releases - -1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md). - -## StaticPage Example - -### Schema - -The component resource's type [token](schema.json#L4) -is `xyz:index:StaticPage` in the -format of `::`. In this case, it's in the `xyz` -package and `index` module. This is the same type token passed inside -the implementation of `StaticPage` in -[staticpage.py](provider/cmd/pulumi-resource-xyz/xyz_provider/staticpage.py#L46), -and also the same token referenced in `construct` in -[provider.py](provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py#L36). - -This component has a required `indexContent` input property typed as -`string`, and two required output properties: `bucket` and -`websiteUrl`. Note that `bucket` is typed as the -`aws:s3/bucket:Bucket` resource from the `aws` provider (in the schema -the `/` is escaped as `%2F`). - -Since this component returns a type from the `aws` provider, each SDK -must reference the associated Pulumi `aws` SDK for the language. For -the .NET, Node.js, and Python SDKs, dependencies are specified in the -[language section](schema.json#31) of the schema. - -### Implementation - -The key method to implement is -[construct](provider/cmd/pulumi-resource-xyz/xyz_provider/provider.py#L36) -on the `Provider` class. It receives `Inputs` representing arguments the user passed, -and returns a `ConstructResult` with the new StaticPage resource `urn` an state. - -It is important that the implementation aligns the structure of inptus -and outputs with the interface declared in `schema.json`. diff --git a/sdk/python/pulumi_xyz/README.md b/sdk/python/pulumi_lambda_builders/README.md similarity index 100% rename from sdk/python/pulumi_xyz/README.md rename to sdk/python/pulumi_lambda_builders/README.md diff --git a/sdk/python/pulumi_xyz/__init__.py b/sdk/python/pulumi_lambda_builders/__init__.py similarity index 51% rename from sdk/python/pulumi_xyz/__init__.py rename to sdk/python/pulumi_lambda_builders/__init__.py index c3915a7..d04bed8 100644 --- a/sdk/python/pulumi_xyz/__init__.py +++ b/sdk/python/pulumi_lambda_builders/__init__.py @@ -1,31 +1,21 @@ # coding=utf-8 -# *** WARNING: this file was generated by Pulumi SDK Generator. *** +# *** WARNING: this file was generated by pulumi-language-python. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from . import _utilities import typing # Export this package's modules as members: from .provider import * -from .static_page import * _utilities.register( resource_modules=""" -[ - { - "pkg": "xyz", - "mod": "index", - "fqn": "pulumi_xyz", - "classes": { - "xyz:index:StaticPage": "StaticPage" - } - } -] +[] """, resource_packages=""" [ { - "pkg": "xyz", - "token": "pulumi:providers:xyz", - "fqn": "pulumi_xyz", + "pkg": "lambda-builders", + "token": "pulumi:providers:lambda-builders", + "fqn": "pulumi_lambda_builders", "class": "Provider" } ] diff --git a/sdk/python/pulumi_xyz/_utilities.py b/sdk/python/pulumi_lambda_builders/_utilities.py similarity index 81% rename from sdk/python/pulumi_xyz/_utilities.py rename to sdk/python/pulumi_lambda_builders/_utilities.py index b12d50f..0eb0046 100644 --- a/sdk/python/pulumi_xyz/_utilities.py +++ b/sdk/python/pulumi_lambda_builders/_utilities.py @@ -1,18 +1,20 @@ # coding=utf-8 -# *** WARNING: this file was generated by Pulumi SDK Generator. *** +# *** WARNING: this file was generated by pulumi-language-python. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** +import asyncio +import importlib.metadata import importlib.util import inspect import json import os -import pkg_resources import sys import typing import pulumi import pulumi.runtime +from pulumi.runtime.sync_await import _sync_await from semver import VersionInfo as SemverVersion from parver import Version as PEP440Version @@ -70,7 +72,7 @@ def _get_semver_version(): # to receive a valid semver string when receiving requests from the language host, so it's our # responsibility as the library to convert our own PEP440 version into a valid semver string. - pep440_version_string = pkg_resources.require(root_package)[0].version + pep440_version_string = importlib.metadata.version(root_package) pep440_version = PEP440Version.parse(pep440_version_string) (major, minor, patch) = pep440_version.release prerelease = None @@ -98,6 +100,17 @@ def _get_semver_version(): def get_version(): return _version_str +def get_resource_opts_defaults() -> pulumi.ResourceOptions: + return pulumi.ResourceOptions( + version=get_version(), + plugin_download_url=get_plugin_download_url(), + ) + +def get_invoke_opts_defaults() -> pulumi.InvokeOptions: + return pulumi.InvokeOptions( + version=get_version(), + plugin_download_url=get_plugin_download_url(), + ) def get_resource_args_opts(resource_args_type, resource_options_type, *args, **kwargs): """ @@ -234,3 +247,45 @@ def lifted_func(*args, opts=None, **kwargs): **resolved_args['kwargs'])) return (lambda _: lifted_func) + + +def call_plain( + tok: str, + props: pulumi.Inputs, + res: typing.Optional[pulumi.Resource] = None, + typ: typing.Optional[type] = None, +) -> typing.Any: + """ + Wraps pulumi.runtime.plain to force the output and return it plainly. + """ + + output = pulumi.runtime.call(tok, props, res, typ) + + # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency. + result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output))) + + problem = None + if not known: + problem = ' an unknown value' + elif secret: + problem = ' a secret value' + + if problem: + raise AssertionError( + f"Plain resource method '{tok}' incorrectly returned {problem}. " + + "This is an error in the provider, please report this to the provider developer." + ) + + return result + + +async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]: + return ( + await o._future, + await o._is_known, + await o._is_secret, + await o._resources, + ) + +def get_plugin_download_url(): + return None diff --git a/sdk/python/pulumi_xyz/provider.py b/sdk/python/pulumi_lambda_builders/provider.py similarity index 85% rename from sdk/python/pulumi_xyz/provider.py rename to sdk/python/pulumi_lambda_builders/provider.py index 3d3d1bb..88e206c 100644 --- a/sdk/python/pulumi_xyz/provider.py +++ b/sdk/python/pulumi_lambda_builders/provider.py @@ -1,7 +1,8 @@ # coding=utf-8 -# *** WARNING: this file was generated by Pulumi SDK Generator. *** +# *** WARNING: this file was generated by pulumi-language-python. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** +import copy import warnings import pulumi import pulumi.runtime @@ -26,7 +27,7 @@ def __init__(__self__, opts: Optional[pulumi.ResourceOptions] = None, __props__=None): """ - Create a Xyz resource with the given unique name, props, and options. + Create a Lambda-builders resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. """ @@ -37,7 +38,7 @@ def __init__(__self__, args: Optional[ProviderArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a Xyz resource with the given unique name, props, and options. + Create a Lambda-builders resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param ProviderArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -54,19 +55,16 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, __props__=None): - if opts is None: - opts = pulumi.ResourceOptions() + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') - if opts.version is None: - opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProviderArgs.__new__(ProviderArgs) super(Provider, __self__).__init__( - 'xyz', + 'lambda-builders', resource_name, __props__, opts) diff --git a/sdk/python/pulumi_lambda_builders/pulumi-plugin.json b/sdk/python/pulumi_lambda_builders/pulumi-plugin.json new file mode 100644 index 0000000..af99269 --- /dev/null +++ b/sdk/python/pulumi_lambda_builders/pulumi-plugin.json @@ -0,0 +1,4 @@ +{ + "resource": true, + "name": "lambda-builders" +} diff --git a/sdk/python/pulumi_xyz/py.typed b/sdk/python/pulumi_lambda_builders/py.typed similarity index 100% rename from sdk/python/pulumi_xyz/py.typed rename to sdk/python/pulumi_lambda_builders/py.typed diff --git a/sdk/python/pulumi_xyz/pulumi-plugin.json b/sdk/python/pulumi_xyz/pulumi-plugin.json deleted file mode 100644 index 3baacc8..0000000 --- a/sdk/python/pulumi_xyz/pulumi-plugin.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "resource": true, - "name": "xyz" -} diff --git a/sdk/python/pulumi_xyz/static_page.py b/sdk/python/pulumi_xyz/static_page.py deleted file mode 100644 index 2b0786f..0000000 --- a/sdk/python/pulumi_xyz/static_page.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by Pulumi SDK Generator. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -import warnings -import pulumi -import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload -from . import _utilities -import pulumi_aws - -__all__ = ['StaticPageArgs', 'StaticPage'] - -@pulumi.input_type -class StaticPageArgs: - def __init__(__self__, *, - index_content: pulumi.Input[str]): - """ - The set of arguments for constructing a StaticPage resource. - :param pulumi.Input[str] index_content: The HTML content for index.html. - """ - pulumi.set(__self__, "index_content", index_content) - - @property - @pulumi.getter(name="indexContent") - def index_content(self) -> pulumi.Input[str]: - """ - The HTML content for index.html. - """ - return pulumi.get(self, "index_content") - - @index_content.setter - def index_content(self, value: pulumi.Input[str]): - pulumi.set(self, "index_content", value) - - -class StaticPage(pulumi.ComponentResource): - @overload - def __init__(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - index_content: Optional[pulumi.Input[str]] = None, - __props__=None): - """ - Create a StaticPage resource with the given unique name, props, and options. - :param str resource_name: The name of the resource. - :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] index_content: The HTML content for index.html. - """ - ... - @overload - def __init__(__self__, - resource_name: str, - args: StaticPageArgs, - opts: Optional[pulumi.ResourceOptions] = None): - """ - Create a StaticPage resource with the given unique name, props, and options. - :param str resource_name: The name of the resource. - :param StaticPageArgs args: The arguments to use to populate this resource's properties. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - ... - def __init__(__self__, resource_name: str, *args, **kwargs): - resource_args, opts = _utilities.get_resource_args_opts(StaticPageArgs, pulumi.ResourceOptions, *args, **kwargs) - if resource_args is not None: - __self__._internal_init(resource_name, opts, **resource_args.__dict__) - else: - __self__._internal_init(resource_name, *args, **kwargs) - - def _internal_init(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - index_content: Optional[pulumi.Input[str]] = None, - __props__=None): - if opts is None: - opts = pulumi.ResourceOptions() - if not isinstance(opts, pulumi.ResourceOptions): - raise TypeError('Expected resource options to be a ResourceOptions instance') - if opts.version is None: - opts.version = _utilities.get_version() - if opts.id is not None: - raise ValueError('ComponentResource classes do not support opts.id') - else: - if __props__ is not None: - raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') - __props__ = StaticPageArgs.__new__(StaticPageArgs) - - if index_content is None and not opts.urn: - raise TypeError("Missing required property 'index_content'") - __props__.__dict__["index_content"] = index_content - __props__.__dict__["bucket"] = None - __props__.__dict__["website_url"] = None - super(StaticPage, __self__).__init__( - 'xyz:index:StaticPage', - resource_name, - __props__, - opts, - remote=True) - - @property - @pulumi.getter - def bucket(self) -> pulumi.Output['pulumi_aws.s3.Bucket']: - """ - The bucket resource. - """ - return pulumi.get(self, "bucket") - - @property - @pulumi.getter(name="websiteUrl") - def website_url(self) -> pulumi.Output[str]: - """ - The website URL. - """ - return pulumi.get(self, "website_url") - diff --git a/sdk/python/setup.py b/sdk/python/setup.py index fc28901..6dd6eba 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -1,5 +1,5 @@ # coding=utf-8 -# *** WARNING: this file was generated by Pulumi SDK Generator. *** +# *** WARNING: this file was generated by pulumi-language-python. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import errno @@ -9,44 +9,22 @@ VERSION = "0.0.0" -PLUGIN_VERSION = "0.0.0" - -class InstallPluginCommand(install): - def run(self): - install.run(self) - try: - check_call(['pulumi', 'plugin', 'install', 'resource', 'xyz', PLUGIN_VERSION]) - except OSError as error: - if error.errno == errno.ENOENT: - print(f""" - There was an error installing the xyz resource provider plugin. - It looks like `pulumi` is not installed on your system. - Please visit https://pulumi.com/ to install the Pulumi CLI. - You may try manually installing the plugin by running - `pulumi plugin install resource xyz {PLUGIN_VERSION}` - """) - else: - raise - - def readme(): try: with open('README.md', encoding='utf-8') as f: return f.read() except FileNotFoundError: - return "xyz Pulumi Package - Development Version" + return "lambda-builders Pulumi Package - Development Version" -setup(name='pulumi_xyz', +setup(name='pulumi_lambda_builders', + python_requires='>=3.8', version=VERSION, long_description=readme(), long_description_content_type='text/markdown', - cmdclass={ - 'install': InstallPluginCommand, - }, packages=find_packages(), package_data={ - 'pulumi_xyz': [ + 'pulumi_lambda_builders': [ 'py.typed', 'pulumi-plugin.json', ] @@ -54,7 +32,7 @@ def readme(): install_requires=[ 'parver>=0.2.1', 'pulumi>=3.0.0,<4.0.0', - 'pulumi-aws>=5.0.0,<6.0.0', + 'pulumi-aws>=6.0.0,<7.0.0', 'semver>=2.8.1' ], zip_safe=False)