magnificent-scientist-64889
12/01/2022, 2:54 PMimport { LocalWorkspace } from '@pulumi/pulumi/automation';
LocalWorkspace.createOrSelectStack({
stackName: 'debug-stack',
workDir: 'debug'
}, {
stackSettings: {
['debug-stack']: {
config: {
'debug-stack:accountId': '012345678912',
'aws:allowedAccountIds': ['012345678912'],
'aws:region': 'eu-west-1'
}
}
},
envVars: { AWS_PROFILE: 'REDACTED', PULUMI_ACCESS_TOKEN: 'REDACTED' }
}).then(stack => {
stack.up({ onEvent: console.log }).then(result => console.log(result.summary));
});
What happens is, after the stack is created in the pulumi cloud, the stack is set without the trailing 0 on the accountId.
The local Pulumi.debug-stack.yaml
file is created correctly at this point.
When running up, the state is read from the pulumi cloud and then fails, as it validates against allowed account ids [ '12345678912'].
When looking at the up request onEvent output, the preludeEvent shows:
{
sequence: 0,
timestamp: 1669902905,
preludeEvent: {
config: {
'aws:allowedAccountIds': '[12345678912]',
'aws:region': 'eu-west-1',
'debug-stack:accountId': '1.2345678912e+10'
}
}
}
So my guess is there is a type conversion error happening in the Cloud Service.many-telephone-49025
12/01/2022, 3:18 PMmagnificent-scientist-64889
12/02/2022, 7:51 AMmany-telephone-49025
12/02/2022, 8:10 AMmagnificent-scientist-64889
12/02/2022, 2:22 PMmany-telephone-49025
12/02/2022, 2:29 PMmagnificent-scientist-64889
12/07/2022, 3:27 PMaws:allowedAccountIds
by doing JSON.stringify(['012345678912'])
. This only works for objects.