https://pulumi.com logo
#general
Title
# general
a

ambitious-stone-55649

01/10/2024, 10:29 AM
Hello everyone 👋, I'm trying to use Pulumi esc. I created Environments with name test-environment and I added variables . I add picture for code and environment.When I perform pulumi preview it does not show me anything. When I run pulumi up it does not show the content of the environment variable and neither does the pulumi export.
d

dry-keyboard-94795

01/10/2024, 11:04 AM
In your Pulumi.dev.yaml file, I don't think
imports
is needed, you just list the environments under
environment
a

ambitious-stone-55649

01/10/2024, 11:12 AM
I tried with only environment but the result is same
d

dry-keyboard-94795

01/10/2024, 11:19 AM
In your esc config, are they added under the
pulumiConfig
map?
a

ambitious-stone-55649

01/10/2024, 11:24 AM
What do you mean ? This:
Copy code
import pulumi
from pulumi import Config
from pulumi_aws import acm, route53


config = Config()

company = config.get("company")
environment = config.get("environment")
region = config.get("region")
d

dry-keyboard-94795

01/10/2024, 11:35 AM
In your esc config in pulumi cloud
a

ambitious-stone-55649

01/10/2024, 11:46 AM
my pulumi config:
d

dry-keyboard-94795

01/10/2024, 11:47 AM
It looks like tou setup the
pulumiConfig
map, as shown in the docs I linked
a

ambitious-stone-55649

01/10/2024, 11:54 AM
I added the values with this:
Copy code
values:
  environmentVariables:
    aws-region: eu-central-1
    company: salesql
    region: euc1
    environment: dev
And it isn't able to obtain the values
d

dry-keyboard-94795

01/10/2024, 11:59 AM
Yes, you use
pulumiConfig
to pass them into your pulumi stacks
a

ambitious-stone-55649

01/10/2024, 12:02 PM
its work, thanks @dry-keyboard-94795. I didn't understand how pulumi esc works well 🙏