Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform Plan results displayed as GitHub PR comment #41

Closed
marshall7m opened this issue Nov 25, 2022 · 1 comment
Closed

Terraform Plan results displayed as GitHub PR comment #41

marshall7m opened this issue Nov 25, 2022 · 1 comment
Labels
chatops This issue is relation to developing components for chat-driven workflows priority

Comments

@marshall7m
Copy link
Owner

marshall7m commented Nov 25, 2022

Have the PR plan and Deployment plan ECS tasks display the terraform plan results as a GitHub comment within the associated PR. The comment could be a diff code block that contains the plan. The reason for using the GitHub diff markdown is because diff blocks highlight lines that start with + as green and - as red which is similar to the annotation within Terraform plan outputs. It would be interesting to know if there's a way to incorporate color highlighting for ~ which represents modifications within terraform plans (maybe with terraform-j2md once issue is resolved)

PR Terraform plans

Possible formats could be:

A: All plans could be consolidated within one comment

  • Each plan can be hidden via GitHub markdown drop downs
  • Compacts PR so they aren't a bunch of comments to parse through

B: Each plan could be posted within its own comment

  • Brings benefit of if a voter wants to comment in relation to the plan, they could "Quote reply" to the entire comment rather than specifying within their comment which PR plan they are referring to
  • To mitigate the issue within option A, the comment could also use the drop-down feature

Execution Terraform plans

Possible formats could be:

A: Each plan could be posted within its own comment using the drop-down feature

  • Have a markdown header that specifies that this plan is in relation to the execution flow and not the open PR plan

B: Same as option A but instead update the open PR plan comment

  • Brings benefit of consolidating all plans in relation to one Terraform configuration within one comment
  • Either could overwrite the open PR plan or create a separate drop-down plan below it that's labeled with the execution ID
  • Would require ECS tasks to parse PR to match the plan with the existing comment
@marshall7m marshall7m added chatops This issue is relation to developing components for chat-driven workflows priority labels Nov 26, 2022
@marshall7m
Copy link
Owner Author

Resolved in PR #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chatops This issue is relation to developing components for chat-driven workflows priority
Projects
None yet
Development

No branches or pull requests

1 participant