https://pulumi.com logo
#azure
Title
s

sparse-intern-71089

08/21/2023, 9:04 PM
This message was deleted.
b

billowy-army-68599

08/21/2023, 9:10 PM
if you run
az version
in your CI/CD pipeline before you run pulumi, what happens?
m

most-pillow-17973

08/21/2023, 9:25 PM
i have latest 2.51
i can't even import an existing resource i have contributor to
b

billowy-army-68599

08/21/2023, 9:27 PM
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

most-pillow-17973

08/21/2023, 9:27 PM
"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

fast-vr-6049

08/21/2023, 9:34 PM
Can you share how you're invoking the Pulumi CLI in your CI/CD system?
b

billowy-army-68599

08/21/2023, 9:34 PM
from your CI/CD pipeline?
m

most-pillow-17973

08/21/2023, 9:35 PM
no just from my powershell terminal
f

fast-vr-6049

08/21/2023, 9:36 PM
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

most-pillow-17973

08/21/2023, 9:37 PM
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

fast-vr-6049

08/21/2023, 9:38 PM
Unfortunately that doesn't answer my question 😅
m

most-pillow-17973

08/21/2023, 9:38 PM
neither
im just trying to push a resource to cloud at this point
from my terminal
f

fast-vr-6049

08/21/2023, 9:39 PM
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

most-pillow-17973

08/21/2023, 9:39 PM
sure
f

fast-vr-6049

08/21/2023, 9:39 PM
Can you share the output of the command
Get-Command az
?
m

most-pillow-17973

08/21/2023, 9:40 PM
Application az.cmd 0.0.0.0 C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
f

fast-vr-6049

08/21/2023, 9:41 PM
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

most-pillow-17973

08/21/2023, 9:43 PM
how would i move forward and corrrect that?
uninstall and reinstall?
f

fast-vr-6049

08/21/2023, 9:44 PM
You'd just need to exit Visual Studio and re-open it
m

most-pillow-17973

08/21/2023, 9:44 PM
ok no ive done that since i installed
f

fast-vr-6049

08/21/2023, 9:44 PM
If you want to be really thorough, you can sign out of Windows and log back in
m

most-pillow-17973

08/21/2023, 9:44 PM
gimme a sec
f

fast-vr-6049

08/21/2023, 9:44 PM
Alright, then that's covered
m

most-pillow-17973

08/21/2023, 9:45 PM
error: Preview failed: could not determine az version: running az: exit status 1
im still just importing
f

fast-vr-6049

08/21/2023, 9:47 PM
Another safety check: you've authenticated your user account into the
az
cli, right?
m

most-pillow-17973

08/21/2023, 9:48 PM
yes a couple of times
f

fast-vr-6049

08/21/2023, 9:52 PM
Great! Can you share how you're invoking
pulumi
?
m

most-pillow-17973

08/21/2023, 9:55 PM
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

fast-vr-6049

08/21/2023, 9:57 PM
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

most-pillow-17973

08/21/2023, 9:57 PM
i have contributor permissions INSIDE the resource group its located in
f

fast-vr-6049

08/21/2023, 10:06 PM
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

most-pillow-17973

08/21/2023, 10:06 PM
i'll have to start there tomorrow
thanks for your help
f

fast-vr-6049

08/21/2023, 10:07 PM
Best of luck!