Skip to content

Commit

Permalink
Upgrade terraform provider nomad to v2.0.0 (#113)
Browse files Browse the repository at this point in the history
Fixes #105 

I followed the steps in:

https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-major-version-update.md

and also these additional steps to upgrade the shim from sdk-v1 to
sdk-v2:
- updated the imports of
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v1" to
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
- used the `NewProvider` method from the tfshim/sdk-v2 to build the
provider
- updated the replace directives in go.mod with the replaces from latest
upstream and from terraform-bridge
  • Loading branch information
mjeffryes authored Sep 13, 2023
2 parents 4c54345 + 8b1aa55 commit 2d5686e
Show file tree
Hide file tree
Showing 286 changed files with 37,611 additions and 3,450 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ builds:
- env GOOS={{ .Os }} GOARCH={{ .Arch }} go clean -modcache
ignore: []
ldflags:
- -X github.com/pulumi/pulumi-nomad/provider/pkg/version.Version={{.Tag}}
- -X github.com/pulumi/pulumi-nomad/provider/v2/pkg/version.Version={{.Tag}}
main: ./cmd/pulumi-resource-nomad/
changelog:
skip: true
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ builds:
- env GOOS={{ .Os }} GOARCH={{ .Arch }} go clean -modcache
ignore: []
ldflags:
- -X github.com/pulumi/pulumi-nomad/provider/pkg/version.Version={{.Tag}}
- -X github.com/pulumi/pulumi-nomad/provider/v2/pkg/version.Version={{.Tag}}
main: ./cmd/pulumi-resource-nomad/
changelog:
filters:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PACK := nomad
ORG := pulumi
PROJECT := github.com/$(ORG)/pulumi-$(PACK)
PROVIDER_PATH := provider
PROVIDER_PATH := provider/v2
VERSION_PATH := $(PROVIDER_PATH)/pkg/version.Version
TFGEN := pulumi-tfgen-$(PACK)
PROVIDER := pulumi-resource-$(PACK)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![NPM version](https://badge.fury.io/js/%40pulumi%2Fnomad.svg)](https://www.npmjs.com/package/@pulumi/nomad)
[![Python version](https://badge.fury.io/py/pulumi-nomad.svg)](https://pypi.org/project/pulumi-nomad)
[![NuGet version](https://badge.fury.io/nu/pulumi.nomad.svg)](https://badge.fury.io/nu/pulumi.nomad)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-nomad/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-nomad/sdk/go)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-nomad/sdk/v2/go)](https://pkg.go.dev/github.com/pulumi/pulumi-nomad/sdk/v2/go)
[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-nomad/blob/master/LICENSE)

# HashiCorp Nomad Resource Provider
Expand Down Expand Up @@ -34,7 +34,7 @@ To use from Python, install using `pip`:

To use from Go, use `go get` to grab the latest version of the library

$ go get github.com/pulumi/pulumi-nomad/sdk
$ go get github.com/pulumi/pulumi-nomad/sdk/v2

### .NET

Expand Down
2 changes: 1 addition & 1 deletion examples/examples_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func getGoBaseOptions(t *testing.T) integration.ProgramTestOptions {
base := getBaseOptions(t)
baseGo := base.With(integration.ProgramTestOptions{
Dependencies: []string{
"github.com/pulumi/pulumi-nomad/sdk",
"github.com/pulumi/pulumi-nomad/sdk/v2/",
},
})

Expand Down
2 changes: 1 addition & 1 deletion examples/namespace/go/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/pulumi/pulumi-nomad/sdk/go/nomad"
"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

Expand Down
Loading

0 comments on commit 2d5686e

Please sign in to comment.