The following state machine definition fails with ...
# golang
The following state machine definition fails with a schema validation error. The resource Arn provided is incorrect. I can see, that instead of the Arn, the resource element contains a memory address:
"Resource": "{0xc0001a6b60}"
. Looking at the example on the DefinitionString should be a string as the name implies. I chose to define the state in a separate variable first, because hard coding the Arn like in the example isn't really feasible. How can I supply the correct Arn to the definition instead of the memory address?
I might add, that when I
ctx.Export("pingFunctionArn", pingFunction.Arn)
I get the correct Arn of the pingFunction ...
Just figured it out (by trial & error 😅). By replacing
Copy code
pingStateMachineDefinition := fmt.Sprintf
Copy code
pingStateMachineDefinition := pulumi.Sprintf
it works ham dance
Read up on Pulumi Outputs, this is all about the output being effectively a promise (in JS terms)
However, this was more about using the correct type. I added the bit with the export only to show that I can retrieve the correct value.