sparse-intern-71089
09/06/2023, 11:53 PMmelodic-tomato-39005
09/07/2023, 5:22 AMacoustic-tiger-77630
09/07/2023, 6:22 AM[ -x /opt/homebrew/bin/pulumi ] || curl -fsSL <https://get.pulumi.com> | sh
pulumi plugin install resource random 4.8.2
(cd provider && go build -o /Users/wguilherme/go/src/github.com/zscaler/pulumi-zpa/bin/pulumi-tfgen-zpa -ldflags "-X <http://github.com/zscaler/pulumi-zpa/provider/pkg/version.Version=0.0.1-alpha.1693978907+dacf430e.dirty|github.com/zscaler/pulumi-zpa/provider/pkg/version.Version=0.0.1-alpha.1693978907+dacf430e.dirty>" <http://github.com/zscaler/pulumi-zpa/provider/cmd/pulumi-tfgen-zpa)|github.com/zscaler/pulumi-zpa/provider/cmd/pulumi-tfgen-zpa)>
# <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tf2pulumi/il|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tf2pulumi/il>
../../../../../pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.58.0/pkg/tf2pulumi/il/plugin_info.go:182:82: not enough arguments in call to workspace.GetPluginPath
have ("<http://github.com/pulumi/pulumi/sdk/v3/go/common/workspace|github.com/pulumi/pulumi/sdk/v3/go/common/workspace>".PluginKind, string, nil, nil)
want (diag.Sink, "<http://github.com/pulumi/pulumi/sdk/v3/go/common/workspace|github.com/pulumi/pulumi/sdk/v3/go/common/workspace>".PluginKind, string, *"<http://github.com/blang/semver|github.com/blang/semver>".Version, []"<http://github.com/pulumi/pulumi/sdk/v3/go/common/workspace|github.com/pulumi/pulumi/sdk/v3/go/common/workspace>".ProjectPlugin)
# <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2>
../../../../../pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.58.0/pkg/tfshim/sdk-v2/resource.go:24:26: r.tf.SchemaMap undefined (type *schema.Resource has no field or method SchemaMap)
../../../../../pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.58.0/pkg/tfshim/sdk-v2/resource.go:90:67: r.tf.SchemaMap undefined (type *schema.Resource has no field or method SchemaMap)
../../../../../pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.58.0/pkg/tfshim/sdk-v2/resource.go:91:22: r.tf.SchemaMap undefined (type *schema.Resource has no field or method SchemaMap)
../../../../../pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.58.0/pkg/tfshim/sdk-v2/schema.go:137:23: e.SchemaMap undefined (type *schema.Resource has no field or method SchemaMap)
make: *** [tfgen] Error 1
melodic-tomato-39005
09/07/2023, 6:45 AMdiag.Sink
to the GetPluginPath
call.limited-rainbow-51650
09/07/2023, 10:36 AMacoustic-tiger-77630
09/07/2023, 3:40 PM---- Setting Up Environment ----
- ✓ GOWORK="off": done
- ✓ PULUMI_MISSING_DOCS_ERROR="true": done
- ✓ PULUMI_CONVERT_EXAMPLES_CACHE_DIR="": done
---- Discovering Repository ----
- Ensure '<http://github.com/zscaler/pulumi-zpa|github.com/zscaler/pulumi-zpa>'
- ✓ Expected Location: /Users/wguilherme/go/src/github.com/zscaler/pulumi-zpa
- ✓ Downloading: skipped - already exists
- ✓ Validating: done
- pull default branch
- ✓ /opt/homebrew/bin/git ls-remote --heads origin: done
- ✓ finding default branch: master
- ✓ /opt/homebrew/bin/git fetch: done
- ✓ /opt/homebrew/bin/git checkout master: done
- ✓ /opt/homebrew/bin/git pull origin: done
- X Repo kind: go.mod: could not find upstream 'zscaler/pulumi-zpa' in go.mod
limited-rainbow-51650
09/07/2023, 3:42 PMlimited-rainbow-51650
09/07/2023, 3:44 PMgh
) installed and a working GITHUB_TOKEN
environment variable allowed to create a branch, push it and create a PR.acoustic-tiger-77630
09/07/2023, 3:52 PMupgrade-provider zscaler/pulumi-zpa --upstream-provider-name zscaler/pulumi-zpa
The same error above still persists.limited-rainbow-51650
09/07/2023, 3:57 PM--upstream-provider-name
actually refers to your Terraform provider, so that should be zscaler/terraform-provider-zpa
acoustic-tiger-77630
09/07/2023, 4:11 PMacoustic-tiger-77630
09/07/2023, 4:16 PM---- Setting Up Environment ----
- ✓ GOWORK="off": done
- ✓ PULUMI_MISSING_DOCS_ERROR="true": done
- ✓ PULUMI_CONVERT_EXAMPLES_CACHE_DIR="": done
---- Discovering Repository ----
- Ensure '<http://github.com/zscaler/pulumi-zpa|github.com/zscaler/pulumi-zpa>'
- ✓ Expected Location: /Users/wguilherme/go/src/github.com/zscaler/pulumi-zpa
- ✓ Downloading: skipped - already exists
- ✓ Validating: done
- pull default branch
- ✓ /opt/homebrew/bin/git ls-remote --heads origin: done
- ✓ finding default branch: master
- ✓ /opt/homebrew/bin/git fetch: done
- ✓ /opt/homebrew/bin/git checkout master: done
- ✓ /opt/homebrew/bin/git pull origin: done
- ✓ Repo kind: plain
- X Planning Provider Update: exit status 1
limited-rainbow-51650
09/07/2023, 4:50 PMacoustic-tiger-77630
09/07/2023, 4:51 PMacoustic-tiger-77630
09/08/2023, 12:18 AM<http://github.com/zscaler/terraform-provider-zia|github.com/zscaler/terraform-provider-zia> => ../upstream
The steps below is what actually fixed things in the end.
require (
<http://github.com/pulumi/pulumi-terraform-bridge/v3|github.com/pulumi/pulumi-terraform-bridge/v3> v3.57.0
<http://github.com/pulumi/pulumi/sdk/v3|github.com/pulumi/pulumi/sdk/v3> v3.76.1
<http://github.com/zscaler/terraform-provider-zpa/v2|github.com/zscaler/terraform-provider-zpa/v2> v2.83.0-beta
)
replace (
<http://github.com/hashicorp/terraform-plugin-sdk/v2|github.com/hashicorp/terraform-plugin-sdk/v2> => <http://github.com/pulumi/terraform-plugin-sdk/v2|github.com/pulumi/terraform-plugin-sdk/v2> v2.0.0-20230710100801-03a71d0fca3d
<http://github.com/zscaler/terraform-provider-zpa|github.com/zscaler/terraform-provider-zpa> => ../upstream
)
In addition to I had to add this file bridge-metadata.json
into the provider/cmd/pulumi-resource-zpa.
Finally, I had to add this entry in my resources.go
//go:embed cmd/pulumi-resource-zpa/bridge-metadata.json
var metadata []byte
Along with importing this
import (
"fmt"
// embed is used to store bridge-metadata.json in the compiled binary
_ "embed"
)
After that all make commands worked without any problems. BTW. Using the upgrading tool didn’t work as described in the README file.melodic-tomato-39005
09/08/2023, 8:12 AM