Skip to content

Commit

Permalink
use the same constants across programs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxstorm committed Dec 8, 2022
1 parent a7a3d70 commit 0756b8a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/aws/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/pulumi/pulumi/sdk/v3/go/auto"
"github.com/jaxxstorm/connecti/pkg/bastion"
)

func Program(name string, ctx context.Context, args BastionArgs) (auto.Stack, error) {
Expand All @@ -24,7 +25,7 @@ func Program(name string, ctx context.Context, args BastionArgs) (auto.Stack, er
return s, fmt.Errorf("error installing AWS resource plugin: %v", err)
}

err = w.InstallPluginFromServer(ctx, "tailscale-bastion", "v0.0.11", "github://api.github.com/lbrlabs")
err = w.InstallPluginFromServer(ctx, bastion.Name, bastion.Version, bastion.Server)
if err != nil {
return s, fmt.Errorf("error installing tailscale plugin: %v", err)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/azure/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/pulumi/pulumi/sdk/v3/go/auto"
"github.com/jaxxstorm/connecti/pkg/bastion"
)

func Program(name string, ctx context.Context, args BastionArgs) (auto.Stack, error) {
Expand All @@ -24,7 +25,7 @@ func Program(name string, ctx context.Context, args BastionArgs) (auto.Stack, er
return s, fmt.Errorf("error installing Azure resource plugin: %v", err)
}

err = w.InstallPluginFromServer(ctx, "tailscale-bastion", "v0.0.11", "github://api.github.com/lbrlabs")
err = w.InstallPluginFromServer(ctx, bastion.Name, bastion.Version, bastion.Server)
if err != nil {
return s, fmt.Errorf("error installing tailscale plugin: %v", err)
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/bastion/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package bastion

const Name = "tailscale-bastion"
const Version = "v0.0.12"
const Server = "github://api.github.com/lbrlabs"
3 changes: 2 additions & 1 deletion pkg/kubernetes/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/pulumi/pulumi/sdk/v3/go/auto"
"github.com/jaxxstorm/connecti/pkg/bastion"
)

func Program(name string, ctx context.Context, args BastionArgs) (auto.Stack, error) {
Expand All @@ -24,7 +25,7 @@ func Program(name string, ctx context.Context, args BastionArgs) (auto.Stack, er
return s, fmt.Errorf("error installing Kubernetes resource plugin: %v", err)
}

err = w.InstallPluginFromServer(ctx, "tailscale-bastion", "v0.0.11", "github://api.github.com/lbrlabs")
err = w.InstallPluginFromServer(ctx, bastion.Name, bastion.Version, bastion.Server)
if err != nil {
return s, fmt.Errorf("error installing tailscale plugin: %v", err)
}
Expand Down

0 comments on commit 0756b8a

Please sign in to comment.