Creates a comment in the current Terraform Cloud Run UI via the Terraform Cloud API.
To use this module with Terraform Cloud, create a team token in your Terraform Cloud account. The team associated with the token must have write access to the Terraform Cloud workspace where the module is called.
The module supports simple string values for comment
:
module "simple_comment" {
source = "git::https://github.com/bixu/terraform-bixu-tfe-comment.git?ref=main"
team_token = var.team_token
comment = "This is a simple comment."
}
as well as multiline strings, by using HEREDOC syntax:
module "multiline_comment" {
source = "git::https://github.com/bixu/terraform-bixu-tfe-comment.git?ref=main"
team_token = var.team_token
comment = <<COMMENT
This is a
multiline comment.
COMMENT
}
You can even use Markdown formatting (so long as the Terraform Cloud UI continues to render Markdown):
module "simple_comment" {
source = "git::https://github.com/bixu/terraform-bixu-tfe-comment.git?ref=main"
team_token = var.team_token
comment = "This is a comment with a `code snippet`."
}