fresh-hospital-81544
05/03/2021, 8:52 AMconst retry_queue = new aws.sqs.Queue("retry", {
delaySeconds: 180,
messageRetentionSeconds: 345600, // 4 days
and then later
});
const queueURL = retry_queue.name.apply(name => aws.sqs.getQueue({
name: name,
}).then(queue => queue.url));
however when I up this I get the error that the queue with the name is not available.
error: Running program '/working/src/stack-staging' failed with an unhandled exception:
Error: invocation of aws:sqs/getQueue:getQueue returned an error: invoking aws:sqs/getQueue:getQueue: 1 error occurred:
* Error getting queue URL: AWS.SimpleQueueService.NonExistentQueue: The specified queue does not exist for this wsdl version.
If I hard code the queueURL and pulumi up
and then restore the second snippet then the script works.
Is there a way to ensure a dependency here?cool-egg-852
05/03/2021, 2:51 PMurl
property on Queue
. Where are you getting .url
from?fresh-hospital-81544
05/03/2021, 9:53 PMurl
property is on aws.sqs.getQueue
cool-egg-852
05/04/2021, 6:42 PMget()
not getQueue()
.name
on the retry
Queue
resource. Are you able to hardcode the value of name
in getQueue
with whatever that value is?fresh-hospital-81544
05/06/2021, 12:33 AMpulumi up
then it runs, then replace the dummy value with the original code and pulumi up
again then everything works.
The issue as I see it is that it is trying to get the name of the queue in the preview, (before I confirm the stack update) and on first run this obviously isnt going to exist.