I’m getting `missing required configuration key "a...
# general
a
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
huh, that's interesting. what does the
Pulumi.<stackname>.yaml
look like
a
Copy code
config:
  aws:region: eu-west-1
b
can you run
pulumi refresh
?
a
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
ugh. try removing the value completely maybe? perhaps there's some weird unicode there shrug
a
ooo yea good idea
yep that’s sorted it!
b
ha, the joys of text parsing 😄
a
oooh actually I think I spoke too soon. It happily previewed the refresh this time, but then gave the same error
b
you might try and edit the config on the console? it
a
You can edit via the console? I haven’t seen that
b
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
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!
449 Views