`esc env get <myOrg>/<myProject>/<myStack>` is wor...
# python
q
esc env get <myOrg>/<myProject>/<myStack>
is working and displays the config in my Pulumi Environment, evident and published in the web UI, but
esc run myOrg/myProject/myStack -- pulumi preview --stack myOrg/myProject/myStack
is not finding it:
Copy code
The stack's environment does not define the `environmentVariables`, `files`, or `pulumiConfig` properties.
Without at least one of these properties, the environment will not affect the stack's behavior.
Help?
sorted it myself, my Pulumi.myStack.yaml required:
Copy code
environment:
  organization: myOrg
  project: myProject
  stack: myStack
  imports:
    - myProject/myStack
r
That shouldn't be necessary. You should just be able to have:
Copy code
environment:
  - myProject/myEnvironment
The error is saying that your environment doesn't have the right keys to affect your stack config - as defined here: https://www.pulumi.com/docs/esc/reference/reserved-properties/
q
dunno what to tell you, my esc env appears correct as far as I can tell?
Copy code
values:
  gcp:
    login:
      fn::open::gcp-login:
        project: 137482643751
        oidc:
          workloadPoolId: pulumi-oidc-identity-pool-6718
          providerId: pulumi-oidc-provider-6718
          serviceAccount: <mailto:pulumi-oidc-service-acct-6718@cotswolds-trellis.iam.gserviceaccount.com|pulumi-oidc-service-acct-6718@cotswolds-trellis.iam.gserviceaccount.com>
  environmentVariables:
    GOOGLE_PROJECT: ${gcp.login.project}
    CLOUDSDK_AUTH_ACCESS_TOKEN: ${gcp.login.accessToken}
  pulumiConfig:
    registryUrl: ...blahblahblah
I've made life easier for myself, rather than setting up the configuration myself I've used the gcp-py-oidc-provider-pulumi-cloud template. But I had to manually tweak the workload identity provider's audience from
myOrg
to
gcp:myOrg
to get it to work, else it complained about the audience:
Copy code
pulumi "the target service indicated by the \"audience\" parameters is invalid. this might either be because the pool or provider is disabled or deleted or because it doesn't exist."
big thanks to @fierce-night-38522 for writing that and @adorable-computer-41765 for housekeeping on it 🎖️ made my life a lot easier ❤️