diff --git a/.gitignore b/.gitignore index a5830312d7..9726487ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,5 @@ yarn.lock .venv +.aider* +.env diff --git a/third_party/pulumi-component-provider-boilerplate/.devcontainer b/go/pulumi/plugin/crane/.devcontainer similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/.devcontainer rename to go/pulumi/plugin/crane/.devcontainer diff --git a/third_party/pulumi-component-provider-boilerplate/.devcontainer.json b/go/pulumi/plugin/crane/.devcontainer.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/.devcontainer.json rename to go/pulumi/plugin/crane/.devcontainer.json diff --git a/third_party/pulumi-component-provider-boilerplate/.github/actions/setup-tools/action.yml b/go/pulumi/plugin/crane/.github/actions/setup-tools/action.yml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/.github/actions/setup-tools/action.yml rename to go/pulumi/plugin/crane/.github/actions/setup-tools/action.yml diff --git a/third_party/pulumi-component-provider-boilerplate/.github/workflows/makefile.yaml b/go/pulumi/plugin/crane/.github/workflows/makefile.yaml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/.github/workflows/makefile.yaml rename to go/pulumi/plugin/crane/.github/workflows/makefile.yaml diff --git a/third_party/pulumi-component-provider-boilerplate/.gitignore b/go/pulumi/plugin/crane/.gitignore similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/.gitignore rename to go/pulumi/plugin/crane/.gitignore diff --git a/third_party/pulumi-component-provider-boilerplate/.gitmodules b/go/pulumi/plugin/crane/.gitmodules similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/.gitmodules rename to go/pulumi/plugin/crane/.gitmodules diff --git a/third_party/pulumi-component-provider-boilerplate/LICENSE b/go/pulumi/plugin/crane/LICENSE similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/LICENSE rename to go/pulumi/plugin/crane/LICENSE diff --git a/third_party/pulumi-component-provider-boilerplate/Makefile b/go/pulumi/plugin/crane/Makefile similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/Makefile rename to go/pulumi/plugin/crane/Makefile diff --git a/third_party/pulumi-component-provider-boilerplate/README.md b/go/pulumi/plugin/crane/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/README.md rename to go/pulumi/plugin/crane/README.md diff --git a/third_party/pulumi-component-provider-boilerplate/deployment-templates/.goreleaser.yml b/go/pulumi/plugin/crane/deployment-templates/.goreleaser.yml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/deployment-templates/.goreleaser.yml rename to go/pulumi/plugin/crane/deployment-templates/.goreleaser.yml diff --git a/third_party/pulumi-component-provider-boilerplate/deployment-templates/README-DEPLOYMENT.md b/go/pulumi/plugin/crane/deployment-templates/README-DEPLOYMENT.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/deployment-templates/README-DEPLOYMENT.md rename to go/pulumi/plugin/crane/deployment-templates/README-DEPLOYMENT.md diff --git a/third_party/pulumi-component-provider-boilerplate/deployment-templates/release.yml b/go/pulumi/plugin/crane/deployment-templates/release.yml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/deployment-templates/release.yml rename to go/pulumi/plugin/crane/deployment-templates/release.yml diff --git a/third_party/pulumi-component-provider-boilerplate/examples/dotnet/.gitignore b/go/pulumi/plugin/crane/examples/dotnet/.gitignore similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/dotnet/.gitignore rename to go/pulumi/plugin/crane/examples/dotnet/.gitignore diff --git a/third_party/pulumi-component-provider-boilerplate/examples/dotnet/Program.cs b/go/pulumi/plugin/crane/examples/dotnet/Program.cs similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/dotnet/Program.cs rename to go/pulumi/plugin/crane/examples/dotnet/Program.cs diff --git a/third_party/pulumi-component-provider-boilerplate/examples/dotnet/Pulumi.yaml b/go/pulumi/plugin/crane/examples/dotnet/Pulumi.yaml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/dotnet/Pulumi.yaml rename to go/pulumi/plugin/crane/examples/dotnet/Pulumi.yaml diff --git a/third_party/pulumi-component-provider-boilerplate/examples/dotnet/provider-xyz-native.csproj b/go/pulumi/plugin/crane/examples/dotnet/provider-xyz-native.csproj similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/dotnet/provider-xyz-native.csproj rename to go/pulumi/plugin/crane/examples/dotnet/provider-xyz-native.csproj diff --git a/third_party/pulumi-component-provider-boilerplate/examples/go/Pulumi.yaml b/go/pulumi/plugin/crane/examples/go/Pulumi.yaml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/go/Pulumi.yaml rename to go/pulumi/plugin/crane/examples/go/Pulumi.yaml diff --git a/third_party/pulumi-component-provider-boilerplate/examples/go/go.mod b/go/pulumi/plugin/crane/examples/go/go.mod similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/go/go.mod rename to go/pulumi/plugin/crane/examples/go/go.mod diff --git a/third_party/pulumi-component-provider-boilerplate/examples/go/main.go b/go/pulumi/plugin/crane/examples/go/main.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/go/main.go rename to go/pulumi/plugin/crane/examples/go/main.go diff --git a/third_party/pulumi-component-provider-boilerplate/examples/nodejs/.gitignore b/go/pulumi/plugin/crane/examples/nodejs/.gitignore similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/nodejs/.gitignore rename to go/pulumi/plugin/crane/examples/nodejs/.gitignore diff --git a/third_party/pulumi-component-provider-boilerplate/examples/nodejs/Pulumi.yaml b/go/pulumi/plugin/crane/examples/nodejs/Pulumi.yaml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/nodejs/Pulumi.yaml rename to go/pulumi/plugin/crane/examples/nodejs/Pulumi.yaml diff --git a/third_party/pulumi-component-provider-boilerplate/examples/nodejs/index.ts b/go/pulumi/plugin/crane/examples/nodejs/index.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/nodejs/index.ts rename to go/pulumi/plugin/crane/examples/nodejs/index.ts diff --git a/third_party/pulumi-component-provider-boilerplate/examples/nodejs/package.json b/go/pulumi/plugin/crane/examples/nodejs/package.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/nodejs/package.json rename to go/pulumi/plugin/crane/examples/nodejs/package.json diff --git a/third_party/pulumi-component-provider-boilerplate/examples/nodejs/tsconfig.json b/go/pulumi/plugin/crane/examples/nodejs/tsconfig.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/nodejs/tsconfig.json rename to go/pulumi/plugin/crane/examples/nodejs/tsconfig.json diff --git a/third_party/pulumi-component-provider-boilerplate/examples/python/.gitignore b/go/pulumi/plugin/crane/examples/python/.gitignore similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/python/.gitignore rename to go/pulumi/plugin/crane/examples/python/.gitignore diff --git a/third_party/pulumi-component-provider-boilerplate/examples/python/Pulumi.yaml b/go/pulumi/plugin/crane/examples/python/Pulumi.yaml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/python/Pulumi.yaml rename to go/pulumi/plugin/crane/examples/python/Pulumi.yaml diff --git a/third_party/pulumi-component-provider-boilerplate/examples/python/__main__.py b/go/pulumi/plugin/crane/examples/python/__main__.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/python/__main__.py rename to go/pulumi/plugin/crane/examples/python/__main__.py diff --git a/third_party/pulumi-component-provider-boilerplate/examples/python/requirements.txt b/go/pulumi/plugin/crane/examples/python/requirements.txt similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/python/requirements.txt rename to go/pulumi/plugin/crane/examples/python/requirements.txt diff --git a/third_party/pulumi-component-provider-boilerplate/examples/yaml/Pulumi.yaml b/go/pulumi/plugin/crane/examples/yaml/Pulumi.yaml similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/yaml/Pulumi.yaml rename to go/pulumi/plugin/crane/examples/yaml/Pulumi.yaml diff --git a/third_party/pulumi-component-provider-boilerplate/examples/yaml/README.md b/go/pulumi/plugin/crane/examples/yaml/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/examples/yaml/README.md rename to go/pulumi/plugin/crane/examples/yaml/README.md diff --git a/go/pulumi/plugin/crane/provider/BUILD.bazel b/go/pulumi/plugin/crane/provider/BUILD.bazel new file mode 100644 index 0000000000..9e698e763f --- /dev/null +++ b/go/pulumi/plugin/crane/provider/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "provider_lib", + srcs = ["main.go"], + deps = [ + "@com_github_pulumi_pulumi//sdk/v3/go/pulumi", + ], +) + +go_binary( + name = "provider", + embed = [":provider_lib"], +) diff --git a/go/pulumi/plugin/crane/provider/cmd/pulumi-resource-crane/main.go b/go/pulumi/plugin/crane/provider/cmd/pulumi-resource-crane/main.go new file mode 100644 index 0000000000..74f172fd05 --- /dev/null +++ b/go/pulumi/plugin/crane/provider/cmd/pulumi-resource-crane/main.go @@ -0,0 +1,24 @@ +// Copyright 2016-2023, 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. + +package main + +import ( + p "github.com/pulumi/pulumi-go-provider" + + crane "github.com/pulumi/pulumi-crane/provider" +) + +// Serve the provider against Pulumi's Provider protocol. +func main() { p.RunProvider(xyz.Name, xyz.Version, xyz.Provider()) } diff --git a/third_party/pulumi-component-provider-boilerplate/provider/cmd/pulumi-resource-xyz/main.go b/go/pulumi/plugin/crane/provider/cmd/pulumi-resource-xyz/main.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/provider/cmd/pulumi-resource-xyz/main.go rename to go/pulumi/plugin/crane/provider/cmd/pulumi-resource-xyz/main.go diff --git a/go/pulumi/plugin/crane/provider/go.mod b/go/pulumi/plugin/crane/provider/go.mod new file mode 100644 index 0000000000..f0130a3362 --- /dev/null +++ b/go/pulumi/plugin/crane/provider/go.mod @@ -0,0 +1,11 @@ +module github.com/zemn-me/monorepo/go/pulumi/plugin/crane/provider + +go 1.22 + +require ( + github.com/blang/semver v3.5.1+incompatible + github.com/pulumi/pulumi-go-provider v0.23.0 + github.com/pulumi/pulumi-random/sdk/v4 v4.16.7 + github.com/pulumi/pulumi/sdk/v3 v3.136.1 + github.com/stretchr/testify v1.9.0 +) diff --git a/third_party/pulumi-component-provider-boilerplate/provider/go.sum b/go/pulumi/plugin/crane/provider/go.sum similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/provider/go.sum rename to go/pulumi/plugin/crane/provider/go.sum diff --git a/go/pulumi/plugin/crane/provider/main.go b/go/pulumi/plugin/crane/provider/main.go new file mode 100644 index 0000000000..11a46a2873 --- /dev/null +++ b/go/pulumi/plugin/crane/provider/main.go @@ -0,0 +1,10 @@ +package main + +import ( + p "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-xyz/provider" +) + +func main() { + p.RunProvider(provider.Name, provider.Version, provider.Provider()) +} diff --git a/third_party/pulumi-component-provider-boilerplate/provider/provider.go b/go/pulumi/plugin/crane/provider/provider.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/provider/provider.go rename to go/pulumi/plugin/crane/provider/provider.go diff --git a/third_party/pulumi-component-provider-boilerplate/provider/randomComponent.go b/go/pulumi/plugin/crane/provider/randomComponent.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/provider/randomComponent.go rename to go/pulumi/plugin/crane/provider/randomComponent.go diff --git a/third_party/pulumi-component-provider-boilerplate/provider/randomResource.go b/go/pulumi/plugin/crane/provider/randomResource.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/provider/randomResource.go rename to go/pulumi/plugin/crane/provider/randomResource.go diff --git a/third_party/pulumi-component-provider-boilerplate/provider/randomResource_test.go b/go/pulumi/plugin/crane/provider/randomResource_test.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/provider/randomResource_test.go rename to go/pulumi/plugin/crane/provider/randomResource_test.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/.gitignore b/go/pulumi/plugin/crane/sdk/.gitignore similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/.gitignore rename to go/pulumi/plugin/crane/sdk/.gitignore diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Config/Config.cs b/go/pulumi/plugin/crane/sdk/dotnet/Config/Config.cs similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Config/Config.cs rename to go/pulumi/plugin/crane/sdk/dotnet/Config/Config.cs diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Config/README.md b/go/pulumi/plugin/crane/sdk/dotnet/Config/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Config/README.md rename to go/pulumi/plugin/crane/sdk/dotnet/Config/README.md diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Provider.cs b/go/pulumi/plugin/crane/sdk/dotnet/Provider.cs similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Provider.cs rename to go/pulumi/plugin/crane/sdk/dotnet/Provider.cs diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Pulumi.Xyz.csproj b/go/pulumi/plugin/crane/sdk/dotnet/Pulumi.Xyz.csproj similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Pulumi.Xyz.csproj rename to go/pulumi/plugin/crane/sdk/dotnet/Pulumi.Xyz.csproj diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/README.md b/go/pulumi/plugin/crane/sdk/dotnet/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/README.md rename to go/pulumi/plugin/crane/sdk/dotnet/README.md diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Random.cs b/go/pulumi/plugin/crane/sdk/dotnet/Random.cs similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Random.cs rename to go/pulumi/plugin/crane/sdk/dotnet/Random.cs diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/RandomComponent.cs b/go/pulumi/plugin/crane/sdk/dotnet/RandomComponent.cs similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/RandomComponent.cs rename to go/pulumi/plugin/crane/sdk/dotnet/RandomComponent.cs diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Utilities.cs b/go/pulumi/plugin/crane/sdk/dotnet/Utilities.cs similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/Utilities.cs rename to go/pulumi/plugin/crane/sdk/dotnet/Utilities.cs diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/logo.png b/go/pulumi/plugin/crane/sdk/dotnet/logo.png similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/logo.png rename to go/pulumi/plugin/crane/sdk/dotnet/logo.png diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/pulumi-plugin.json b/go/pulumi/plugin/crane/sdk/dotnet/pulumi-plugin.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/pulumi-plugin.json rename to go/pulumi/plugin/crane/sdk/dotnet/pulumi-plugin.json diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/dotnet/version.txt b/go/pulumi/plugin/crane/sdk/dotnet/version.txt similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/dotnet/version.txt rename to go/pulumi/plugin/crane/sdk/dotnet/version.txt diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go.mod b/go/pulumi/plugin/crane/sdk/go.mod similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go.mod rename to go/pulumi/plugin/crane/sdk/go.mod diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go.sum b/go/pulumi/plugin/crane/sdk/go.sum similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go.sum rename to go/pulumi/plugin/crane/sdk/go.sum diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/config/config.go b/go/pulumi/plugin/crane/sdk/go/xyz/config/config.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/config/config.go rename to go/pulumi/plugin/crane/sdk/go/xyz/config/config.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/doc.go b/go/pulumi/plugin/crane/sdk/go/xyz/doc.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/doc.go rename to go/pulumi/plugin/crane/sdk/go/xyz/doc.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/init.go b/go/pulumi/plugin/crane/sdk/go/xyz/init.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/init.go rename to go/pulumi/plugin/crane/sdk/go/xyz/init.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/internal/pulumiUtilities.go b/go/pulumi/plugin/crane/sdk/go/xyz/internal/pulumiUtilities.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/internal/pulumiUtilities.go rename to go/pulumi/plugin/crane/sdk/go/xyz/internal/pulumiUtilities.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/internal/pulumiVersion.go b/go/pulumi/plugin/crane/sdk/go/xyz/internal/pulumiVersion.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/internal/pulumiVersion.go rename to go/pulumi/plugin/crane/sdk/go/xyz/internal/pulumiVersion.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/provider.go b/go/pulumi/plugin/crane/sdk/go/xyz/provider.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/provider.go rename to go/pulumi/plugin/crane/sdk/go/xyz/provider.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/pulumi-plugin.json b/go/pulumi/plugin/crane/sdk/go/xyz/pulumi-plugin.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/pulumi-plugin.json rename to go/pulumi/plugin/crane/sdk/go/xyz/pulumi-plugin.json diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/random.go b/go/pulumi/plugin/crane/sdk/go/xyz/random.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/random.go rename to go/pulumi/plugin/crane/sdk/go/xyz/random.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/randomComponent.go b/go/pulumi/plugin/crane/sdk/go/xyz/randomComponent.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/go/xyz/randomComponent.go rename to go/pulumi/plugin/crane/sdk/go/xyz/randomComponent.go diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/README.md b/go/pulumi/plugin/crane/sdk/nodejs/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/README.md rename to go/pulumi/plugin/crane/sdk/nodejs/README.md diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/config/index.ts b/go/pulumi/plugin/crane/sdk/nodejs/config/index.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/config/index.ts rename to go/pulumi/plugin/crane/sdk/nodejs/config/index.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/config/vars.ts b/go/pulumi/plugin/crane/sdk/nodejs/config/vars.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/config/vars.ts rename to go/pulumi/plugin/crane/sdk/nodejs/config/vars.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/index.ts b/go/pulumi/plugin/crane/sdk/nodejs/index.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/index.ts rename to go/pulumi/plugin/crane/sdk/nodejs/index.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/package.json b/go/pulumi/plugin/crane/sdk/nodejs/package.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/package.json rename to go/pulumi/plugin/crane/sdk/nodejs/package.json diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/provider.ts b/go/pulumi/plugin/crane/sdk/nodejs/provider.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/provider.ts rename to go/pulumi/plugin/crane/sdk/nodejs/provider.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/random.ts b/go/pulumi/plugin/crane/sdk/nodejs/random.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/random.ts rename to go/pulumi/plugin/crane/sdk/nodejs/random.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/randomComponent.ts b/go/pulumi/plugin/crane/sdk/nodejs/randomComponent.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/randomComponent.ts rename to go/pulumi/plugin/crane/sdk/nodejs/randomComponent.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/tsconfig.json b/go/pulumi/plugin/crane/sdk/nodejs/tsconfig.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/tsconfig.json rename to go/pulumi/plugin/crane/sdk/nodejs/tsconfig.json diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/nodejs/utilities.ts b/go/pulumi/plugin/crane/sdk/nodejs/utilities.ts similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/nodejs/utilities.ts rename to go/pulumi/plugin/crane/sdk/nodejs/utilities.ts diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/README.md b/go/pulumi/plugin/crane/sdk/python/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/README.md rename to go/pulumi/plugin/crane/sdk/python/README.md diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/README.md b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/README.md similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/README.md rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/README.md diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/__init__.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/__init__.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/__init__.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/__init__.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/_utilities.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/_utilities.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/_utilities.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/_utilities.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/config/__init__.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/config/__init__.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/config/__init__.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/config/__init__.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/config/__init__.pyi b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/config/__init__.pyi similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/config/__init__.pyi rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/config/__init__.pyi diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/config/vars.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/config/vars.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/config/vars.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/config/vars.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/provider.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/provider.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/provider.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/provider.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/pulumi-plugin.json b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/pulumi-plugin.json similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/pulumi-plugin.json rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/pulumi-plugin.json diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/py.typed b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/py.typed similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/py.typed rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/py.typed diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/random.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/random.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/random.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/random.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/random_component.py b/go/pulumi/plugin/crane/sdk/python/pulumi_xyz/random_component.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/pulumi_xyz/random_component.py rename to go/pulumi/plugin/crane/sdk/python/pulumi_xyz/random_component.py diff --git a/third_party/pulumi-component-provider-boilerplate/sdk/python/setup.py b/go/pulumi/plugin/crane/sdk/python/setup.py similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/sdk/python/setup.py rename to go/pulumi/plugin/crane/sdk/python/setup.py diff --git a/third_party/pulumi-component-provider-boilerplate/tests/go.mod b/go/pulumi/plugin/crane/tests/go.mod similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/tests/go.mod rename to go/pulumi/plugin/crane/tests/go.mod diff --git a/third_party/pulumi-component-provider-boilerplate/tests/go.sum b/go/pulumi/plugin/crane/tests/go.sum similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/tests/go.sum rename to go/pulumi/plugin/crane/tests/go.sum diff --git a/third_party/pulumi-component-provider-boilerplate/tests/provider_test.go b/go/pulumi/plugin/crane/tests/provider_test.go similarity index 100% rename from third_party/pulumi-component-provider-boilerplate/tests/provider_test.go rename to go/pulumi/plugin/crane/tests/provider_test.go diff --git a/go/pulumi/provider/something/provider.go b/go/pulumi/provider/something/provider.go new file mode 100644 index 0000000000..117effbf6a --- /dev/null +++ b/go/pulumi/provider/something/provider.go @@ -0,0 +1,66 @@ +// Copyright 2016-2023, 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. + +package provider + +import ( + p "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/infer" + "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" +) + +// Version is initialized by the Go linker to contain the semver of this build. +var Version string + +const Name string = "xyz" + +func Provider() p.Provider { + // We tell the provider what resources it needs to support. + // In this case, a single resource and component + return infer.Provider(infer.Options{ + Resources: []infer.InferredResource{ + infer.Resource[Random, RandomArgs, RandomState](), + }, + Resources: []infer.InferredResource{ + infer.Resource[CraneImage, CraneImageArgs, CraneImageState](), + }, + Components: []infer.InferredComponent{ + infer.Component[*RandomComponent, RandomComponentArgs, *RandomComponentState](), + }, + Config: infer.Config[Config](), + ModuleMap: map[tokens.ModuleName]tokens.ModuleName{ + "provider": "index", + }, + }) +} + +// CraneImage represents a resource for uploading an OCI image to ECR using Crane. +type CraneImage struct{} + +// CraneImageArgs are the input arguments for creating a CraneImage resource. +type CraneImageArgs struct { + ImagePath string `pulumi:"imagePath"` + Repository string `pulumi:"repository"` + Tag string `pulumi:"tag"` +} + +// CraneImageState is the state of a CraneImage resource. +type CraneImageState struct { + ImageDigest string `pulumi:"imageDigest"` +} + +// Define some provider-level configuration +type Config struct { + Scream *bool `pulumi:"itsasecret,optional"` +} diff --git a/third_party/pulumi-component-provider-boilerplate/provider/go.mod b/third_party/pulumi-component-provider-boilerplate/provider/go.mod deleted file mode 100644 index 7475f6ca2f..0000000000 --- a/third_party/pulumi-component-provider-boilerplate/provider/go.mod +++ /dev/null @@ -1,105 +0,0 @@ -module github.com/pulumi/pulumi-xyz/provider - -go 1.22 - -toolchain go1.23.2 - -require ( - github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi-go-provider v0.23.0 - github.com/pulumi/pulumi-random/sdk/v4 v4.16.7 - github.com/pulumi/pulumi/sdk/v3 v3.136.1 - github.com/stretchr/testify v1.9.0 -) - -require ( - dario.cat/mergo v1.0.0 // indirect - github.com/BurntSushi/toml v1.2.1 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v1.0.0 // indirect - github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.25.0 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect - github.com/cheggaaa/pb v1.0.29 // indirect - github.com/cloudflare/circl v1.3.7 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/djherbis/times v1.5.0 // indirect - github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.12.0 // indirect - github.com/gofrs/uuid v4.3.1+incompatible // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.18.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.2 // indirect - github.com/natefinch/atomic v1.0.1 // indirect - github.com/opentracing/basictracer-go v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pgavlin/fx v0.1.6 // indirect - github.com/pgavlin/goldmark v1.1.33-0.20200616210433-b5eb04559386 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect - github.com/pulumi/esc v0.10.0 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.134.0 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect - github.com/segmentio/asm v1.2.0 // indirect - github.com/segmentio/encoding v0.3.6 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/skeema/knownhosts v1.2.2 // indirect - github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.14.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - golang.org/x/crypto v0.25.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/tools v0.22.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.33.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/frand v1.4.2 // indirect -) diff --git a/tsconfig.json b/tsconfig.json index d53ba23d26..0bca155bab 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,4 +36,4 @@ "dist", "external" ] -} \ No newline at end of file +}