diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 35df671b..a05692ef 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -105,6 +105,13 @@ jobs: 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/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index f211aee4..6bbb35d3 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -106,6 +106,13 @@ jobs: 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/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts @@ -309,6 +316,42 @@ jobs: if: failure() name: Send Publish Failure To Slack uses: rtCamp/action-slack-notify@v2 + publish_go_sdk: + name: publish_go_sdk + needs: publish_sdk + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + tag: v0.0.46 + repo: pulumi/pulumictl + - id: version + uses: pulumi/provider-version-action@v1 + - 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 + shell: bash + - 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 + # Avoid including other language SDKs & artifacts in the commit + files: | + go.* + go/** + !*.tar.gz test: name: test needs: build_sdk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e4490b3..6fa1bca0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,6 +105,13 @@ jobs: 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/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts @@ -336,9 +343,28 @@ jobs: repo: pulumi/pulumictl - id: version uses: pulumi/provider-version-action@v1 - - name: Add SDK version tag - run: git tag "sdk/v${{ steps.version.outputs.version }}" && git push origin - "sdk/v${{ steps.version.outputs.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 + shell: bash + - 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 + # Avoid including other language SDKs & artifacts in the commit + files: | + go.* + go/** + !*.tar.gz clean_up_release_labels: name: Clean up release labels diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 21e194b8..03d2b637 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -115,6 +115,13 @@ jobs: 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/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts diff --git a/provider/cmd/pulumi-resource-mongodbatlas/schema.json b/provider/cmd/pulumi-resource-mongodbatlas/schema.json index 583244ab..0cc1d618 100644 --- a/provider/cmd/pulumi-resource-mongodbatlas/schema.json +++ b/provider/cmd/pulumi-resource-mongodbatlas/schema.json @@ -17,12 +17,14 @@ "packageReferences": { "Pulumi": "3.*" }, - "compatibility": "tfbridge20" + "compatibility": "tfbridge20", + "respectSchemaVersion": true }, "go": { "importBasePath": "github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas", "generateResourceContainerTypes": true, - "generateExtraInputTypes": true + "generateExtraInputTypes": true, + "respectSchemaVersion": true }, "nodejs": { "packageDescription": "A Pulumi package for creating and managing mongodbatlas cloud resources.", @@ -35,7 +37,8 @@ "@types/node": "^10.0.0" }, "compatibility": "tfbridge20", - "disableUnionOutputTypes": true + "disableUnionOutputTypes": true, + "respectSchemaVersion": true }, "python": { "requires": { @@ -43,6 +46,7 @@ }, "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/mongodb/terraform-provider-mongodbatlas)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-mongodbatlas` repo](https://github.com/pulumi/pulumi-mongodbatlas/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-mongodbatlas` repo](https://github.com/mongodb/terraform-provider-mongodbatlas/issues).", "compatibility": "tfbridge20", + "respectSchemaVersion": true, "pyproject": { "enabled": true } diff --git a/provider/resources.go b/provider/resources.go index 2cd71ae5..10753bcc 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -119,12 +119,15 @@ func Provider() tfbridge.ProviderInfo { "@types/node": "^10.0.0", // so we can access strongly typed node definitions. "@types/mime": "^2.0.0", }, + RespectSchemaVersion: true, }, Python: (func() *tfbridge.PythonInfo { i := &tfbridge.PythonInfo{ + RespectSchemaVersion: true, Requires: map[string]string{ "pulumi": ">=3.0.0,<4.0.0", - }} + }, + } i.PyProject.Enabled = true return i })(), @@ -137,8 +140,10 @@ func Provider() tfbridge.ProviderInfo { mainPkg, ), GenerateResourceContainerTypes: true, + RespectSchemaVersion: true, }, CSharp: &tfbridge.CSharpInfo{ + RespectSchemaVersion: true, PackageReferences: map[string]string{ "Pulumi": "3.*", }, diff --git a/sdk/dotnet/Pulumi.Mongodbatlas.csproj b/sdk/dotnet/Pulumi.Mongodbatlas.csproj index b9dc9518..d9be8487 100644 --- a/sdk/dotnet/Pulumi.Mongodbatlas.csproj +++ b/sdk/dotnet/Pulumi.Mongodbatlas.csproj @@ -9,6 +9,7 @@ https://pulumi.io https://github.com/pulumi/pulumi-mongodbatlas logo.png + 3.0.0-alpha.0+dev net6.0 enable diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index 7c0ba9a1..a8abd9af 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "mongodbatlas" + "name": "mongodbatlas", + "version": "3.0.0-alpha.0+dev" } diff --git a/sdk/go/mongodbatlas/internal/pulumiUtilities.go b/sdk/go/mongodbatlas/internal/pulumiUtilities.go index d1a4557e..8f2fed59 100644 --- a/sdk/go/mongodbatlas/internal/pulumiUtilities.go +++ b/sdk/go/mongodbatlas/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := SdkVersion + version := semver.MustParse("3.0.0-alpha.0+dev") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := SdkVersion + version := semver.MustParse("3.0.0-alpha.0+dev") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/sdk/go/mongodbatlas/pulumi-plugin.json b/sdk/go/mongodbatlas/pulumi-plugin.json index 7c0ba9a1..a8abd9af 100644 --- a/sdk/go/mongodbatlas/pulumi-plugin.json +++ b/sdk/go/mongodbatlas/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "mongodbatlas" + "name": "mongodbatlas", + "version": "3.0.0-alpha.0+dev" } diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index bf5891ff..5e31631d 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@pulumi/mongodbatlas", - "version": "${VERSION}", + "version": "3.0.0-alpha.0+dev", "description": "A Pulumi package for creating and managing mongodbatlas cloud resources.", "keywords": [ "pulumi", @@ -22,6 +22,7 @@ }, "pulumi": { "resource": true, - "name": "mongodbatlas" + "name": "mongodbatlas", + "version": "3.0.0-alpha.0+dev" } } diff --git a/sdk/python/pulumi_mongodbatlas/pulumi-plugin.json b/sdk/python/pulumi_mongodbatlas/pulumi-plugin.json index 7c0ba9a1..a8abd9af 100644 --- a/sdk/python/pulumi_mongodbatlas/pulumi-plugin.json +++ b/sdk/python/pulumi_mongodbatlas/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "mongodbatlas" + "name": "mongodbatlas", + "version": "3.0.0-alpha.0+dev" } diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index b778a714..c7acd04b 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -5,7 +5,7 @@ keywords = ["pulumi", "mongodbatlas"] readme = "README.md" requires-python = ">=3.8" - version = "0.0.0" + version = "3.0.0a0+dev" [project.license] text = "Apache-2.0" [project.urls]