Skip to content

Commit

Permalink
Use Github Releases API for plugin downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
ringods committed Oct 31, 2023
1 parent 600f174 commit b7998f3
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-talos/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"attribution": "This Pulumi package is based on the [`talos` Terraform Provider](https://github.com/siderolabs/terraform-provider-talos).",
"repository": "https://github.com/pulumiverse/pulumi-talos",
"logoUrl": "https://www.talos.dev/images/Sidero_stacked_darkbkgd_RGB.png",
"pluginDownloadURL": "https://github.com/pulumiverse/pulumi-talos/releases",
"pluginDownloadURL": "github://api.github.com/pulumiverse",
"publisher": "Pulumiverse",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
Expand Down
2 changes: 1 addition & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func Provider() tfbridge.ProviderInfo {
Version: version.Version,
Publisher: "Pulumiverse",
LogoURL: "https://www.talos.dev/images/Sidero_stacked_darkbkgd_RGB.png",
PluginDownloadURL: "https://github.com/pulumiverse/pulumi-talos/releases",
PluginDownloadURL: "github://api.github.com/pulumiverse",
MetadataInfo: tfbridge.NewProviderMetadata(metadata),
Resources: map[string]*tfbridge.ResourceInfo{
"talos_machine_bootstrap": {Tok: tfbridge.MakeResource(talosPkg, machineMod, "Bootstrap")},
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Machine/Bootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://github.com/pulumiverse/pulumi-talos/releases",
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/Machine/ConfigurationApply.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://github.com/pulumiverse/pulumi-talos/releases",
PluginDownloadURL = "github://api.github.com/pulumiverse",
AdditionalSecretOutputs =
{
"machineConfiguration",
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Machine/Secrets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://github.com/pulumiverse/pulumi-talos/releases",
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/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://github.com/pulumiverse/pulumi-talos/releases",
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/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static class Utilities
{
var dst = src ?? new global::Pulumi.InvokeOptions{};
dst.Version = src?.Version ?? Version;
dst.PluginDownloadURL = src?.PluginDownloadURL ?? "https://github.com/pulumiverse/pulumi-talos/releases";
dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github://api.github.com/pulumiverse";
return dst;
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource": true,
"name": "talos",
"server": "https://github.com/pulumiverse/pulumi-talos/releases"
"server": "github://api.github.com/pulumiverse"
}
4 changes: 2 additions & 2 deletions sdk/go/talos/internal/pulumiUtilities.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/go/talos/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource": true,
"name": "talos",
"server": "https://github.com/pulumiverse/pulumi-talos/releases"
"server": "github://api.github.com/pulumiverse"
}
2 changes: 1 addition & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"pulumi": {
"resource": true,
"name": "talos",
"server": "https://github.com/pulumiverse/pulumi-talos/releases"
"server": "github://api.github.com/pulumiverse"
}
}
2 changes: 1 addition & 1 deletion sdk/nodejs/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function getVersion(): string {

/** @internal */
export function resourceOptsDefaults(): any {
return { version: getVersion(), pluginDownloadURL: "https://github.com/pulumiverse/pulumi-talos/releases" };
return { version: getVersion(), pluginDownloadURL: "github://api.github.com/pulumiverse" };
}

/** @internal */
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pulumiverse_talos/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,4 @@ def lifted_func(*args, opts=None, **kwargs):
return (lambda _: lifted_func)

def get_plugin_download_url():
return "https://github.com/pulumiverse/pulumi-talos/releases"
return "github://api.github.com/pulumiverse"
2 changes: 1 addition & 1 deletion sdk/python/pulumiverse_talos/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource": true,
"name": "talos",
"server": "https://github.com/pulumiverse/pulumi-talos/releases"
"server": "github://api.github.com/pulumiverse"
}

0 comments on commit b7998f3

Please sign in to comment.