Skip to content

Commit

Permalink
Fixup package registration for Go SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Jan 28, 2021
1 parent 8bbe4bb commit ec44375
Show file tree
Hide file tree
Showing 75 changed files with 163 additions and 86 deletions.
4 changes: 4 additions & 0 deletions provider/cmd/pulumi-resource-gcp/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -110528,6 +110528,10 @@
"System.Collections.Immutable": "1.6.0"
}
},
"go": {
"generateResourceContainerTypes": true,
"importBasePath": "github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
},
"nodejs": {
"dependencies": {
"@pulumi/pulumi": "^2.15.0",
Expand Down
4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.15

require (
github.com/hashicorp/terraform-provider-google-beta/v3 v3.51.0
github.com/pulumi/pulumi-terraform-bridge/v2 v2.18.0
github.com/pulumi/pulumi/sdk/v2 v2.18.0
github.com/pulumi/pulumi-terraform-bridge/v2 v2.18.1-0.20210128145316-5b5467501ada
github.com/pulumi/pulumi/sdk/v2 v2.18.2
)

replace (
Expand Down
6 changes: 4 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -618,13 +618,15 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.18.0 h1:on+pV+9qT4Mc3k1ktJeUr2VA7nWcTzbcit4JR1U20aQ=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.18.0/go.mod h1:UrgBEaSeCcTUfjd4bdYe3YdQpBMr4ewN00wuVH+jDh0=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.18.1-0.20210128145316-5b5467501ada h1:ARG45LWm/Gnakyo6x9TiDi8QnyHefGqrQQOwoiEh3sU=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.18.1-0.20210128145316-5b5467501ada/go.mod h1:UrgBEaSeCcTUfjd4bdYe3YdQpBMr4ewN00wuVH+jDh0=
github.com/pulumi/pulumi/pkg/v2 v2.18.0 h1:vH+VyzpxWZVW7CSJ7ThD0w6uKXQa5j+TptzyQM6eT2o=
github.com/pulumi/pulumi/pkg/v2 v2.18.0/go.mod h1:bAbzFeU3gHu1diqcckqUqaFf5dP02BfJlP8dnHwm00k=
github.com/pulumi/pulumi/sdk/v2 v2.2.1/go.mod h1:QNbWpL4gvf3X0lUFT7TXA2Jo1ff/Ti2l97AyFGYwvW4=
github.com/pulumi/pulumi/sdk/v2 v2.18.0 h1:fOno92mnb/4xoVV+TqtQG0W6KCJLe87JyfBVVhZ8voE=
github.com/pulumi/pulumi/sdk/v2 v2.18.0/go.mod h1:fCFhRV6NmidWetmgDPA76efL+s0JqLlS54JJIwfOt+o=
github.com/pulumi/pulumi/sdk/v2 v2.18.2 h1:LMgbPunosWURPPcLPZXk/JQiq2UiMbNaC+R1OtZU+aY=
github.com/pulumi/pulumi/sdk/v2 v2.18.2/go.mod h1:fCFhRV6NmidWetmgDPA76efL+s0JqLlS54JJIwfOt+o=
github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e h1:Dik4Qe/+xguB8JagPyXNlbOnRiXGmq/PSPQTGunYnTk=
github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e/go.mod h1:sZ9FUzGO+yM41hsQHs/yIcj/Y993qMdBxBU5mpDmAfQ=
github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20201218231525-9cca98608a5e h1:jl43csgF3BSlNRmjo+TGgjW/uXk9h7+NoR3doKQ0BT4=
Expand Down
12 changes: 12 additions & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
package gcp

import (
"fmt"
"github.com/pulumi/pulumi-gcp/provider/v4/pkg/version"
"path/filepath"
"strings"
"unicode"

Expand Down Expand Up @@ -2411,6 +2414,15 @@ func Provider() tfbridge.ProviderInfo {
},
},
},
Golang: &tfbridge.GolangInfo{
ImportBasePath: filepath.Join(
fmt.Sprintf("github.com/pulumi/pulumi-%[1]s/sdk/", gcpPackage),
tfbridge.GetModuleMajorVersion(version.Version),
"go",
gcpPackage,
),
GenerateResourceContainerTypes: true,
},
Python: &tfbridge.PythonInfo{
Requires: map[string]string{
"pulumi": ">=2.15.0,<3.0.0",
Expand Down
3 changes: 2 additions & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/pulumi/pulumi-gcp/sdk/v4
go 1.14

require (
github.com/blang/semver v3.5.1+incompatible
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi/sdk/v2 v2.2.1
github.com/pulumi/pulumi/sdk/v2 v2.19.0
)
82 changes: 70 additions & 12 deletions sdk/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/go/gcp/accesscontextmanager/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/activedirectory/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/apigateway/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/apigee/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/appengine/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/artifactregistry/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/bigquery/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/bigtable/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/billing/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/binaryauthorization/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/certificateauthority/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudasset/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudbuild/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudfunctions/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudidentity/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudrun/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudscheduler/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/cloudtasks/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/composer/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/compute/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/container/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/containeranalysis/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/datacatalog/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/dataflow/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/datafusion/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/dataloss/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/dataproc/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/datastore/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/deploymentmanager/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/diagflow/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/dns/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/endpoints/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/filestore/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/firebase/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/firestore/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/go/gcp/folder/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"

"github.com/blang/semver"
"github.com/pulumi/pulumi-gcp/sdk/v2/go/gcp"
"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

Expand Down
Loading

0 comments on commit ec44375

Please sign in to comment.