https://pulumi.com logo
Title
f

freezing-waiter-91293

02/24/2020, 11:12 AM
Hi! I am trying to add the pulumi azure pipeline (using the pulumi azure extension) with the local file state management. I use:
- task: Pulumi@1
  inputs:
    azureSubscription: 'Visual Studio Enterprise ~~'
    command: 'up'
    loginArgs: '<file://infra/pulumi-state>'
    cwd: 'infra'
    stack: 'production'`
but it fails because it tries to find the files in
<buildDir>/infra/infra/pulumi-state
. When I use:
loginArgs: '<file://pulumi-state>'
it fails as well because it looks at this path:
<buildDir>/pulumi-state
. What am i doing wrong ?
t

tall-librarian-49374

02/24/2020, 12:37 PM
@clever-sunset-76585 do you know?
f

freezing-waiter-91293

02/24/2020, 2:33 PM
I've got it working by adding this fragment to Pulumi.yaml:
backend:
  url: <file://pulumi-state>
c

clever-sunset-76585

02/24/2020, 5:55 PM
I haven’t tried to use local state myself with the Pulumi task, but I would have expected it to use the input
loginArgs
as-is when you specify
<file://infra/pulumi-state>
. I don’t think it should matter, but could you please try to set the
loginArgs
to
-c <file://infra/pulumi-state>
?
f

freezing-waiter-91293

02/25/2020, 9:41 AM
That worked
👍 1
Thanks!
c

colossal-room-15708

02/26/2020, 2:50 AM
Just because I'm curious... This means your state is not retained, right? Unless you're running this on a self-hosted build agent?!