Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Add a GitHub Actions job to format embedded Terraform code within RST #1224

Closed
dewan-ahmed opened this issue Aug 9, 2022 · 3 comments
Closed
Assignees

Comments

@dewan-ahmed
Copy link
Contributor

What's wrong?

Currently, formatting embedded Terraform code within RST files is a manual process. The proposal is to run a GitHub Actions job in the CI workflow that will automatically format any embedded Terraform code within RST files. Rather than having this job run with every PR, the job should run only if there’s any code change under https://github.com/aiven/devportal/tree/main/docs/tools/terraform

Any other information

The RST support has been added to terrafmt via katbyte/terrafmt#60

@dewan-ahmed dewan-ahmed self-assigned this Aug 9, 2022
@laysauchoa
Copy link
Contributor

seems like a good idea, I think I'll give a try for python code too
#1226

@lornajane
Copy link
Contributor

I would recommend we move the code out to terraform files and format those correctly, then include the code samples into the articles. The very early code snippets worked this way, but then we started just putting code inline. We've discussed this separation for making code examples more testable as well.

@dewan-ahmed
Copy link
Contributor Author

When this issue was created, we didn't have the overall Terraform code testing conversation. I agree that rather than adding the formatting separately, the testing repo and associated GH action can take care of code formatting as well. Closing this issue as this work will be part of the broader Terraform code testing effort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants