The following state machine definition fails with ...
# golang
p
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 https://www.pulumi.com/registry/packages/aws-native/api-docs/stepfunctions/statemachine/ 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
with
Copy code
pingStateMachineDefinition := pulumi.Sprintf
it works ham dance
s
Read up on Pulumi Outputs, this is all about the output being effectively a promise (in JS terms)
p
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.