straight-cartoon-24485
09/20/2023, 8:50 PMpulumi-openwrt/examples/openwrt-system/ts 255 pulumi up
Previewing update (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/pcuci/ts/dev/previews/d4770506-61cd-4002-b5f4-2ae37c244f8f>
Type Name Plan Info
+ pulumi:pulumi:Stack ts-dev create
└─ pulumi:providers:openwrt openwrtProvider 1 error
Diagnostics:
pulumi:providers:openwrt (openwrtProvider):
error: Could not automatically download and install resource plugin 'pulumi-resource-openwrt' at version v0.0.1-alpha.1695222502+35e1f4e7.dirty, install the plugin using `pulumi plugin install resource openwrt v0.0.1-alpha.1695222502+35e1f4e7.dirty --server <github://api.github.com/deposition-cloud/pulumi-openwrt>`: error downloading provider openwrt to file: failed to download plugin: openwrt-0.0.1-alpha.1695222502+35e1f4e7.dirty: 404 HTTP error fetching plugin from <https://api.github.com/repos/deposition-cloud/pulumi-openwrt/releases/tags/v0.0.1-alpha.1695222502+35e1f4e7.dirty>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
Code here: https://github.com/deposition-cloud/pulumi-openwrt - in case anyone familiar with the bridging workflow wants to have a look; what am I missing?
...after the second run of make tfgen
I noticed the .dirty
suffix—what exactly is happening here?echoing-dinner-19531
09/20/2023, 9:17 PMmake provider
to build the provider binary so it's on $PATH?straight-cartoon-24485
09/20/2023, 11:08 PMprovider:: tfgen install_plugins # build the provider binary
(cd provider && go build -o $(WORKING_DIR)/bin/${PROVIDER} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/${PROVIDER})
Had to inquire ChatGPT:
The command performs the following actions:
1. Change Directory: It changes the current directory to provider
using cd provider
.
2. _Go Build: It then runs go build
to compile the Go code located in ${PROJECT}/${PROVIDER_PATH}/cmd/${PROVIDER}
._
3. _Output: The compiled binary is saved to $(WORKING_DIR)/bin/${PROVIDER}
._
4. Linker Flags: It sets some linker flags to embed the version information into the binary.
This make task doesn't seem to add anything to the PATH, so I symlinked ./bin/pulumi-resource-openwrt
to ~/go/bin/pulumi-resource-openwrt
and it was picked up ✅.
Next error 🙂
pulumi up
Previewing update (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/pcuci/ts/dev/previews/9498ada9-bbe5-4071-af4d-ee57be9ad417>
Type Name Plan Info
+ pulumi:pulumi:Stack ts-dev create 2 warnings
└─ pulumi:providers:openwrt openwrtProvider 1 error
Diagnostics:
pulumi:providers:openwrt (openwrtProvider):
error: pulumi:providers:openwrt resource 'openwrtProvider' has a problem: could not validate provider configuration: Invalid or unknown key. Examine values at 'openwrtProvider.pluginDownloadURL'.
pulumi:pulumi:Stack (ts-dev):
warning: using pulumi-resource-openwrt from $PATH at /home/paul/go/bin/pulumi-resource-openwrt
warning: using pulumi-resource-openwrt from $PATH at /home/paul/go/bin/pulumi-resource-openwrt
I can only guess it's complaining about this line: https://github.com/deposition-cloud/pulumi-openwrt/blob/109b949f89b1cb83cbdc3be8244cdd3eb5d97900/provider/resources.go#L83
(?)
Am I returning the right thing here: https://github.com/deposition-cloud/pulumi-openwrt/blob/109b949f89b1cb83cbdc3be8244cdd3eb5d97900/provider/resources.go#L187
return pf.ProviderInfo{
ProviderInfo: prov,
NewProvider: func() pfprovider.Provider {
return openwrt.New(version.Version, os.LookupEnv)
},
}
echoing-dinner-19531
09/21/2023, 11:11 AMThis make task doesn't seem to add anything to the PATHAh right some of our provider makefiles build directly to /go/bin, assumed this one was the same. Just symlinking works.
I can only guess it's complaining about this lineThat pluginUrl looks fine. It might be you just need to update the deps in go.mod to the lastest version of github.com/pulumi/pulumi-terraform-bridge/v3 and github.com/pulumi/pulumi-terraform-bridge/pf
big-architect-71258
09/21/2023, 11:55 AMstraight-cartoon-24485
09/21/2023, 12:39 PMProviderInfo
struct anymore, so the code I shared above breaks
@big-architect-71258 - any plans to upgrade your cookiecutter?big-architect-71258
09/21/2023, 12:43 PM