I've been looking at fixing <https://github.com/pu...
# contribute
t
I've been looking at fixing https://github.com/pulumi/pulumi/issues/2784. Found a plausible place in
pulumi/pulumi/pkg/resource/asset.go
where the fix could go. I build
pulumi
CLI with a fix and see the paths do change while running
pulumi up
(with logging to console), however the archive binary in Azure Blob Storage does NOT change. Question: is this piece of code executed inside CLI or also inside the azure provider process? If the later, how do I setup the local environement to be able to bring locally changed package
pulumi/pulumi
to
pulumi-azure
?
w
This code is called from
pulumi-terraform
which is linked into
pulumi-azure
and other providers. See for example: https://github.com/pulumi/pulumi-terraform/blob/018e686ef075981921d0fb19e71fc65a0db87b9a/pkg/tfbridge/schema.go#L403 To test changes here: 1. Make the changes in your local copy of
pulumi-terraform
2. In
pulumi-azure
run
go mod edit -replace=<http://github.com/pulumi/pulumi-terraform=../pulumi-terraform/|github.com/pulumi/pulumi-terraform=../pulumi-terraform/>
3. Run
make install
in
pulumi-azure
4. From your example code,
yarn link @pulumi/azure
to use the newly built version This should result in using the latest Node package and provider binary in your test.
t
Thanks, will try
Given my changes are in
pulumi/pulumi
, do I need to
go mod edit -replace=<http://github.com/pulumi/pulumi=../pulumi/|github.com/pulumi/pulumi=../pulumi/>
from
pulumi/azure
?
w
Ahh - good point - yes you likely do.
t
After doing so,
make install
gives me an error like here https://github.com/google/go-cloud/issues/1990
ambiguous import: found <http://github.com/Azure/go-autorest/tracing|github.com/Azure/go-autorest/tracing> in multiple modules
w
cc @stocky-spoon-28903 who may know off the top of his head.
s
I’ve not seen that one before
t
Resolved it by
replace <http://github.com/Azure/go-autorest|github.com/Azure/go-autorest> => <http://github.com/Azure/go-autorest|github.com/Azure/go-autorest> v11.1.2+incompatible
Another issue I had is that
pulumi-terraform
wouldn't build with the latest
pulumi/pulumi
, so I had to checkout pulumi@0.17.6 (the one from
go.mod
in
pulumi-terraform
).
And then the whole setup finally works, I can produce
pulumi-azure
with modified code from
pulumi/pulumi
.
I even got it building on Windows without WSL