Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move to pulimiverse #38

Merged
merged 4 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ on:
workflow_dispatch:
issues:
types:
- opened
- opened
schedule:
- cron: '0 5 * * *'
- cron: "0 5 * * *"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
upgrade_provider:
name: upgrade-provider
runs-on: ubuntu-latest
steps:
- name: Call upgrade provider action
uses: pulumi/pulumi-upgrade-provider-action@main
with:
username: omercnet
kind: bridge
- name: Call upgrade provider action
uses: pulumi/pulumi-upgrade-provider-action@main
with:
username: omercnet
kind: bridge
9 changes: 5 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ archives:
name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
before:
hooks:
- make tfgen
- make provider
builds:
- binary: pulumi-resource-vercel
dir: provider
env:
- CGO_ENABLED=0
- GO111MODULE=on
goarch:
- amd64
- arm64
Expand All @@ -17,13 +18,13 @@ builds:
- windows
- linux
ldflags:
# The line below MUST align with the module in current provider/go.mod
- -X github.com/omercnet/pulumi-vercel/provider/pkg/version.Version={{.Tag }}
- -s
- -w
- -X github.com/pulumiverse/pulumi-vercel/provider/pkg/version.Version={{.Tag}}
main: ./cmd/pulumi-resource-vercel/
changelog:
skip: true
release:
disable: false
prerelease: auto
snapshot:
name_template: "{{ .Tag }}-SNAPSHOT"
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ PROJECT_NAME := vercel Package

SHELL := /bin/bash
PACK := vercel
ORG := omercnet
ORG := pulumiverse
PROJECT := github.com/${ORG}/pulumi-${PACK}
NODE_MODULE_NAME := @pulumi/${PACK}
NODE_MODULE_NAME := @pulumiverse/${PACK}
TF_NAME := ${PACK}
PROVIDER_PATH := provider
VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pip install pulumi_vercel
To use from Go, use `go get` to grab the latest version of the library:

```bash
go get github.com/omercnet/pulumi-vercel/sdk/go/...
go get github.com/pulumiverse/pulumi-vercel/sdk/go/...
```

### .NET
Expand Down
1 change: 0 additions & 1 deletion examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ func getBaseOptions() integration.ProgramTestOptions {
return integration.ProgramTestOptions{
RunUpdateTest: false,
ExpectRefreshChanges: true,
ch
}
}
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/omercnet/pulumi-vercel/examples
module github.com/pulumiverse/pulumi-vercel/examples

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion examples/vercel/ts/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as vercel from "@pulumi/vercel";
import * as vercel from "@pulumiverse/vercel";

const project = new vercel.Project("pulumi-vercel", {
rootDirectory: "src",
Expand Down
22 changes: 11 additions & 11 deletions provider/cmd/pulumi-resource-vercel/bridge-metadata.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-vercel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
_ "embed"

vercel "github.com/omercnet/pulumi-vercel/provider"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
vercel "github.com/pulumiverse/pulumi-vercel/provider"
)

//go:embed schema-embed.json
Expand Down
31 changes: 27 additions & 4 deletions provider/cmd/pulumi-resource-vercel/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "vercel",
"attribution": "This Pulumi package is based on the [`vercel` Terraform Provider](https://github.com/terraform-providers/terraform-provider-vercel).",
"pluginDownloadURL": "github://api.github.com/pulumiverse",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
Expand All @@ -10,21 +11,43 @@
"namespaces": null,
"packageReferences": {
"Pulumi": "3.*"
}
},
"rootNamespace": "Pulumiverse"
},
"go": {
"generateExtraInputTypes": true,
"generateResourceContainerTypes": true,
"importBasePath": "github.com/omercnet/pulumi-vercel/sdk/go/vercel"
"importBasePath": "github.com/pulumiverse/pulumi-vercel/sdk/go/vercel"
},
"java": {
"basePackage": "com.pulumiverse",
"buildFiles": "",
"gradleNexusPublishPluginVersion": ""
},
"nodejs": {
"compatibility": "tfbridge20",
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"devDependencies": {
"@types/mime": "^2.0.0",
"@types/node": "^10.0.0"
},
"disableUnionOutputTypes": true,
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-vercel)\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-vercel` repo](/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-vercel` repo](https://github.com/terraform-providers/terraform-provider-vercel/issues)."
"packageDescription": "",
"packageName": "@pulumiverse/vercel",
"pluginName": "",
"pluginVersion": "",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-vercel)\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-vercel` repo](/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-vercel` repo](https://github.com/terraform-providers/terraform-provider-vercel/issues).",
"typescriptVersion": ""
},
"python": {
"compatibility": "tfbridge20",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-vercel)\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-vercel` repo](/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-vercel` repo](https://github.com/terraform-providers/terraform-provider-vercel/issues)."
"packageName": "pulumiverse_vercel",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-vercel)\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-vercel` repo](/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-vercel` repo](https://github.com/terraform-providers/terraform-provider-vercel/issues).",
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
}
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-tfgen-vercel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package main

import (
vercel "github.com/omercnet/pulumi-vercel/provider"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfgen"
vercel "github.com/pulumiverse/pulumi-vercel/provider"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module github.com/omercnet/pulumi-vercel/provider
module github.com/pulumiverse/pulumi-vercel/provider

go 1.20

require (
github.com/pulumi/pulumi-terraform-bridge/pf v0.14.1
github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.3
github.com/vercel/terraform-provider-vercel v0.15.0
golang.org/x/text v0.10.0
)

require github.com/Masterminds/semver v1.5.0 // indirect
Expand Down Expand Up @@ -220,7 +221,6 @@ require (
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.114.0 // indirect
Expand Down
41 changes: 32 additions & 9 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ import (
"fmt"
"path/filepath"

"github.com/omercnet/pulumi-vercel/provider/pkg/version"
pf "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
"github.com/pulumiverse/pulumi-vercel/provider/pkg/version"
"golang.org/x/text/cases"
"golang.org/x/text/language"

"github.com/vercel/terraform-provider-vercel/vercel"
)
Expand All @@ -33,7 +35,8 @@ const (
// registries for nodejs and python:
mainPkg = "vercel"
// modules:
mainMod = "index" // the vercel module
mainMod = "index" // the vercel module
publisher = "pulumiverse"
)

//go:embed cmd/pulumi-resource-vercel/bridge-metadata.json
Expand All @@ -44,14 +47,14 @@ func Provider() tfbridge.ProviderInfo {
// Instantiate the Terraform provider
p := pf.ShimProvider(vercel.New())

caser := cases.Title(language.English)

// Create a Pulumi provider mapping
prov := tfbridge.ProviderInfo{
P: p,
Name: mainPkg,
Version: version.Version,
// PluginDownloadURL is an optional URL used to download the Provider
// for use in Pulumi programs
// e.g https://github.com/org/pulumi-provider-name/releases/
P: p,
Name: mainPkg,
Version: version.Version,
PluginDownloadURL: "github://api.github.com/pulumiverse",
Resources: map[string]*tfbridge.ResourceInfo{
"vercel_alias": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "Alias"),
Fields: map[string]*tfbridge.SchemaInfo{
Expand All @@ -61,20 +64,40 @@ func Provider() tfbridge.ProviderInfo {
},
},
},
JavaScript: &tfbridge.JavaScriptInfo{
PackageName: fmt.Sprintf("@%s/%s", publisher, mainPkg),
Dependencies: map[string]string{
"@pulumi/pulumi": "^3.0.0",
},
DevDependencies: map[string]string{
"@types/node": "^10.0.0", // so we can access strongly typed node definitions.
"@types/mime": "^2.0.0",
},
},
Python: &tfbridge.PythonInfo{
PackageName: fmt.Sprintf("%s_%s", publisher, mainPkg),
Requires: map[string]string{
"pulumi": ">=3.0.0,<4.0.0",
},
},
Golang: &tfbridge.GolangInfo{
ImportBasePath: filepath.Join(
fmt.Sprintf("github.com/omercnet/pulumi-%[1]s/sdk/", mainPkg),
fmt.Sprintf("github.com/pulumiverse/pulumi-%[1]s/sdk/", mainPkg),
tfbridge.GetModuleMajorVersion(version.Version),
"go",
mainPkg,
),
GenerateResourceContainerTypes: true,
},
CSharp: &tfbridge.CSharpInfo{
RootNamespace: caser.String(publisher),
PackageReferences: map[string]string{
"Pulumi": "3.*",
},
},
Java: &tfbridge.JavaInfo{
BasePackage: "com.pulumiverse",
},
MetadataInfo: tfbridge.NewProviderMetadata(bridgeMetadata),
}

Expand Down
4 changes: 3 additions & 1 deletion sdk/dotnet/Alias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
[VercelResourceType("vercel:index/alias:Alias")]
public partial class Alias : global::Pulumi.CustomResource
Expand Down Expand Up @@ -54,6 +55,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/pulumiverse",
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Collections.Immutable;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
public static class Config
{
Expand Down
4 changes: 3 additions & 1 deletion sdk/dotnet/Deployment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
[VercelResourceType("vercel:index/deployment:Deployment")]
public partial class Deployment : global::Pulumi.CustomResource
Expand Down Expand Up @@ -108,6 +109,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/pulumiverse",
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand Down
4 changes: 3 additions & 1 deletion sdk/dotnet/DnsRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
[VercelResourceType("vercel:index/dnsRecord:DnsRecord")]
public partial class DnsRecord : global::Pulumi.CustomResource
Expand Down Expand Up @@ -90,6 +91,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/pulumiverse",
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand Down
3 changes: 2 additions & 1 deletion sdk/dotnet/GetAlias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
public static class GetAlias
{
Expand Down
3 changes: 2 additions & 1 deletion sdk/dotnet/GetFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
public static class GetFile
{
Expand Down
3 changes: 2 additions & 1 deletion sdk/dotnet/GetPrebuiltProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
public static class GetPrebuiltProject
{
Expand Down
3 changes: 2 additions & 1 deletion sdk/dotnet/GetProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Vercel
namespace Pulumiverse.Vercel
{
public static class GetProject
{
Expand Down
Loading