go-tfe icon indicating copy to clipboard operation
go-tfe copied to clipboard

RunCreateOptions doesn't allow setting a comment

Open dkirrane opened this issue 3 years ago • 1 comments

For a Speculative Plan I'd like to add a comment.

However, RunCreateOptions doesn't provide an option.

I can set a comment for Apply but not for Runs that are plan only.

dkirrane avatar Feb 14 '22 18:02 dkirrane

@dkirrane The Terraform Cloud/Enterprise API supports the UI when adding comments to runs, but our API docs and this SDK don't seem to expose it yet. I've logged this as a feature request. There are a handful of API endpoints that go-tfe doesn't yet support and we are tracking these for future releases. Most likely, comments will need to be created by invoking a separate Comments.Create function instead of setting a Comment field on a plan-only Run.

In the meantime, another option is to populate the Message field of the RunCreateOptions. In the UI, this appears here:

Custom Message

brandonc avatar Feb 17 '22 19:02 brandonc