This message was deleted.
# general
s
This message was deleted.
d
I use the “pulumi config set” to do this.
I then have a module which reads in config values and sets defaults if not present.
IE.
Copy code
import pulumi

config = pulumi.Config()
gcp_config = pulumi.Config("gcp")


class StackConfig:
    NAME_PREFIX = config.get("namePrefix") or pulumi.get_stack()

    SINK_DISABLE = config.get_bool("sinkDisable") or False
    SINK_NAME = "{}-sink".format(NAME_PREFIX)
    SINK_PUBSUB_TOPIC_NAME = "{}-log-topic".format(NAME_PREFIX)
    SINK_PUBSUB_TOPIC_WRITER_IAM_NAME = "{}-topic-writer-iam".format(NAME_PREFIX)

    VPC_DISABLE = config.get_bool("vpcDisable") or False
    VPC_NAME = "{}-vpc".format(NAME_PREFIX)

    ADDRESS_RESERVATIONS_DISABLE = config.get_bool("addressReservationsDisable") or False
...
p
I’m not using python, but typescript - we use environment variables and pass it like this:
MY_PARAM=XXX pulumi up
and then:
<http://process.env.MY|process.env.MY>_PARAM
. But I would also rather have the possibility to pass it as real parameters to e.g.
pulumi up myParam=XXX
g
Good ideas. Thank you!!