https://pulumi.com logo
b

big-jordan-24260

06/04/2023, 9:09 PM
Hi, Some help understanding the behavior would be very appreciated: I have 2 stacks, one called core and another called base: The core pulumi file is name: core-infra project: dev-core-infra runtime: name: python description: Core Infra Dev The Stack file has the following configuration for aws region awsregion eu-west-1 And the main file uses it with region=config.get(“aws:region”) And the deploy has no issue. On the base the pulumi file is name: base-infra project: dev-base-infra runtime: name: python description: Base Infra Dev the stack file has the following for aws region awsregion eu-west-1 the main file for base uses it region=config.get(“aws:region”) But the result during deploy is pulumipulumiStack (base-infra-dev-base-infra): error: Missing required configuration variable ‘base-infraawsregion’ please set a value using the command
pulumi config set base-infra:aws:region <value>
error: an unhandled error occurred: program exited with non-zero exit code: 1 Thanks ahead
w

white-balloon-205

06/04/2023, 10:41 PM
The way to access aws configuration from code is slightly different than what you are trying here. See the second example at https://www.pulumi.com/docs/concepts/config/#code. Note that the error message says it is looking for base-infraawsregion when you want just aws:region.