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

ancient-monkey-64322

10/19/2021, 7:39 PM
I’m getting
missing required configuration key "aws:region"
when trying to update a stack where this config is definitely set.
pulumi up
and
pulumi destroy
both give a similar output
Copy code
pulumi destroy -y --show-config


...

     Type                       Name                Status                  Info
     pulumi:pulumi:Stack        app-petetest        **failed**              1 error; 1 message
 -   └─ aws:ecs:TaskDefinition  api                 **deleting failed**     1 error
 
Diagnostics:
  pulumi:pulumi:Stack (app-petetest):
    Configuration:
        aws:region: eu-west-1
    error: update failed
 
  aws:ecs:TaskDefinition (api):
    error: 1 error occurred:
        * missing required configuration key "aws:region": The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc.
    Set a value using the command `pulumi config set aws:region <value>`.
If I create a new stack and add the config everything works as expected
so maybe the state in pulumi cloud is missing this config?
b

billowy-army-68599

10/19/2021, 8:22 PM
huh, that's interesting. what does the
Pulumi.<stackname>.yaml
look like
a

ancient-monkey-64322

10/19/2021, 8:39 PM
Copy code
config:
  aws:region: eu-west-1
b

billowy-army-68599

10/19/2021, 8:40 PM
can you run
pulumi refresh
?
a

ancient-monkey-64322

10/19/2021, 8:41 PM
I get the same error
Copy code
Diagnostics:
  aws:ecs:TaskDefinition (api):
    error: Preview failed: 1 error occurred:
        * missing required configuration key "aws:region": The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc.
    Set a value using the command `pulumi config set aws:region <value>`.
 
  pulumi:pulumi:Stack (klydo-app-petetest):
    error: preview failed
b

billowy-army-68599

10/19/2021, 8:42 PM
ugh. try removing the value completely maybe? perhaps there's some weird unicode there shrug
a

ancient-monkey-64322

10/19/2021, 8:42 PM
ooo yea good idea
yep that’s sorted it!
b

billowy-army-68599

10/19/2021, 8:44 PM
ha, the joys of text parsing 😄
a

ancient-monkey-64322

10/19/2021, 8:45 PM
oooh actually I think I spoke too soon. It happily previewed the refresh this time, but then gave the same error
b

billowy-army-68599

10/19/2021, 8:50 PM
you might try and edit the config on the console? it
a

ancient-monkey-64322

10/19/2021, 8:56 PM
You can edit via the console? I haven’t seen that
b

billowy-army-68599

10/19/2021, 8:58 PM
i thought you could, my bad. it sounds like you need to override it on the far side, you might try opening an issue to see if any of our smart engineers have any ideas
👍 1
a

ancient-monkey-64322

10/19/2021, 9:18 PM
Cool shall do! Thanks for your help so far
Managed to fix it by importing the last working checkpoint from the pulumi console and running refresh!
Copy code
cat ~/Downloads/checkpoint.app.petetest-17.json | pulumi stack import

pulumi refresh
The checkpoints themselves look very similar: Mensions of
region
in the one that didn’t work:
Copy code
{
        "urn": "urn:pulumi:petetest::app::pulumi:providers:aws::default_4_15_0",
        "custom": true,
        "id": "929f27cb-d6d4-48ab-8183-7e6721e3415f",
        "type": "pulumi:providers:aws",
        "inputs": { "region": "eu-west-1", "version": "4.15.0" },
        "outputs": { "region": "eu-west-1", "version": "4.15.0" }
      },
The one that did work…
Copy code
{
        "urn": "urn:pulumi:petetest::klydo-app::pulumi:providers:aws::default_4_14_0",
        "custom": true,
        "id": "3c814e44-4f28-4f8e-83e3-afd281ea8eeb",
        "type": "pulumi:providers:aws",
        "inputs": { "region": "eu-west-1", "version": "4.14.0" },
        "outputs": { "region": "eu-west-1", "version": "4.14.0" }
      },
So I guess the act of importing was what fixed it
I’m not sure what I’d do to reproduce this, but shall keep an eye out for it happening again!
324 Views