Format github comment as hcl
lijok opened this issue · comments
Github supports hcl formatting by encapsulating code blocks with ```hcl
without:
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
# module.state.aws_dynamodb_table.state_file_locking_table will be created
+ resource "aws_dynamodb_table" "state_file_locking_table" {
+ arn = (known after apply)
+ billing_mode = "PROVISIONED"
+ hash_key = "LockID"
+ id = (known after apply)
+ name = "staging-terraform-state"
+ read_capacity = 20
+ stream_arn = (known after apply)
+ stream_label = (known after apply)
+ stream_view_type = (known after apply)
+ write_capacity = 20
+ attribute {
+ name = "LockID"
+ type = "S"
}
+ point_in_time_recovery {
+ enabled = (known after apply)
}
+ server_side_encryption {
+ enabled = (known after apply)
+ kms_key_arn = (known after apply)
}
}
with:
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
# module.state.aws_dynamodb_table.state_file_locking_table will be created
+ resource "aws_dynamodb_table" "state_file_locking_table" {
+ arn = (known after apply)
+ billing_mode = "PROVISIONED"
+ hash_key = "LockID"
+ id = (known after apply)
+ name = "staging-terraform-state"
+ read_capacity = 20
+ stream_arn = (known after apply)
+ stream_label = (known after apply)
+ stream_view_type = (known after apply)
+ write_capacity = 20
+ attribute {
+ name = "LockID"
+ type = "S"
}
+ point_in_time_recovery {
+ enabled = (known after apply)
}
+ server_side_encryption {
+ enabled = (known after apply)
+ kms_key_arn = (known after apply)
}
}
I would raise a pr but I saw in one of the issues that you guys try to support platforms other than github as well and I'm not sure if this applies to other platforms
Thanks
I would love this! I don't think you need to worry about non-github compatibility because the action is entirely specialised towards posting on github PR comments.