This message was deleted.
# azure
s
This message was deleted.
b
if you run
az version
in your CI/CD pipeline before you run pulumi, what happens?
m
i have latest 2.51
i can't even import an existing resource i have contributor to
b
well the error message is telling you that the command
az version
isn’t working correctly, so I think you need to run that command outside of pulumi to dtermine what the exit message says
m
"azure-cli": "2.51.0", "azure-cli-core": "2.51.0", "azure-cli-telemetry": "1.1.0", "extensions": { "resource-graph": "2.1.0"
where could it be cached?
maybe i have mis matched versioning>
i can create resources in the cli tho
i try to import the resource i just created and it fails
f
Can you share how you're invoking the Pulumi CLI in your CI/CD system?
b
from your CI/CD pipeline?
m
no just from my powershell terminal
f
Sorry, maybe we should take a step back here. Your first message is edited to say you're operating on a CI/CD system; do you mean you're trying to execute Pulumi inside a CI/CD pipeline, or that you're trying to use Pulumi to provision a CI/CD provider?
m
right now we're just testing to see how it would work within our cloud
ive been messing with the tool for about a week
works perfectly fine on my homelab
i can make templates rapidly and deploy
any time i try to import in visual studio or push changes it errors out
f
Unfortunately that doesn't answer my question 😅
m
neither
im just trying to push a resource to cloud at this point
from my terminal
f
We're trying to understand where you're running your
pulumi
commands so we can try to track down where the
az
command is failing
Okay, locally!
m
sure
f
Can you share the output of the command
Get-Command az
?
m
Application az.cmd 0.0.0.0 C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
f
Excellent, looks normal
Just for the avoidance of doubt, as you mentioned you're newly trying this out at work, did you install
az
and/or
pulumi
very recently? I'm wondering if perhaps you installed one or both of them while your Visual Studio instance was still running
If so, it might not get the new items in the
$PATH
m
how would i move forward and corrrect that?
uninstall and reinstall?
f
You'd just need to exit Visual Studio and re-open it
m
ok no ive done that since i installed
f
If you want to be really thorough, you can sign out of Windows and log back in
m
gimme a sec
f
Alright, then that's covered
m
error: Preview failed: could not determine az version: running az: exit status 1
im still just importing
f
Another safety check: you've authenticated your user account into the
az
cli, right?
m
yes a couple of times
f
Great! Can you share how you're invoking
pulumi
?
m
im just running "pulumi import" with a storage container
and i have the correct address
im trying to import and resources.json and that isnt working either
f
Hm, alright. This might be a bit of a stretch, but does the user(s) you've logged into the
az
cli with have permission to access the storage container you're using for the state?
m
i have contributor permissions INSIDE the resource group its located in
f
Alright! The only other thing I can think of is running
pulumi
at various verbosity levels to see if we can get any more context. Maybe try
pulumi --verbose 3 <your parameters>
to start, and we can increase the level from there
m
i'll have to start there tomorrow
thanks for your help
f
Best of luck!