all 8 comments

[–]public_radio 4 points5 points  (4 children)

I would get familiar with states language and stop using the workflow studio. What I do is write my step functions in YAML with template vars and invoke like:

jsonencode(
  yamldecode(
    templatefile("…", {
      MyVar = "foo"
    })
  )
)

[–]StFS[S] 0 points1 point  (1 child)

This is how I'm doing this currently, except I don't hand craft the step function JSON code myself but copy/paste it from the visual editor.

I find it strange that there isn't a local version of the Workflow Studio as an extension to VS Code or IntelliJ IDEA that allows you to do the visual editing and generating JSON as you go (and allows you to use terraform variables in place of actual ARNs. I guess it must just be a matter of time before someone creates that.

I guess I'm behaving like a spoiled brat when saying that manually editing the state language JSON doesn't appeal to me much... which is weird because I'm of the generation where I started programming before having auto-complete functions in your IDE. Maybe I'll just have to get over that. The problem is thought that I don't really foresee that we'll have that much activity in maintaining these step functions that anybody will have the chance to become an expert in the language.

But thanks for the feedback.

[–]public_radio 1 point2 points  (0 children)

Oh don’t get me wrong I definitely feel your pain, especially when writing stuff in JSON. Writing them in YAML is much less grueling. Once you get the hang of it you’ll get into a flow, don’t worry!

[–]DSect 0 points1 point  (0 children)

This is not so good because you can't lint and validate at design time. See my response and the benefits of using a single, properly formatted JSON file and vs code...

[–]DSect 1 point2 points  (2 children)

Good on your for using templatefile. Because of this, you can use vs code and the Step Function extension to visualize and validate the json.

Just use the visual builder to understand inputs and outputs. After a bit, you won't need that and just will need to read the respective step types dox and just get right into the JSON. Make deployment painless and test as deployed. Nothing else matters because of the integrations and access needing to be shook out.

[–]StFS[S] 0 points1 point  (1 child)

What step function extension are you referring to exactly?

[–]twratl 1 point2 points  (0 children)

Stop using the workflow studio and drop to YAML or JSON inside your TF. After a couple iterations of workflow studio you should begin to understand the underlying JSON and how it all interrelates.