terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Print a custom message (maybe with formatting) when a certain resource is created/updated

Open captainfalcon23 opened this issue 3 years ago • 7 comments

Terraform Version

Terraform v1.2.8
on linux_amd64

Use Cases

The use case is summed up pretty well here -> https://stackoverflow.com/questions/66675106/is-there-a-way-to-add-comments-for-teraform-to-display-at-the-end-of-terraform

In essence, unfortuantely terraform can't do everything. I have a use case where there is no AWS CLI/API command to perform a task and it must be done manually in the console after a specific resource is created or updated. I want to print a message after a plan/apply, so the engineer is reminded of this manual action. Preferably, it would be nice to include formatting such as colour and text size too.

Another simple use case could be to print a message reminding the user to checkin their code to git after applying.

Attempted Solutions

The solution in https://stackoverflow.com/questions/66675106/is-there-a-way-to-add-comments-for-teraform-to-display-at-the-end-of-terraform seems ok but also seems like a hacky workaround.

Proposal

No response

References

No response

captainfalcon23 avatar Sep 07 '22 11:09 captainfalcon23

Thanks for this request!

crw avatar Sep 09 '22 00:09 crw

Hi, I would like to contribute to this issue.

Hussain0520 avatar Sep 10 '22 03:09 Hussain0520

Hi @Hussain0520, I recommend checking out the good first issue tag in the terraform-provider-aws repository. They are soliciting new user contributions. Thanks for your interest!

crw avatar Oct 05 '22 19:10 crw

@crw is there any update on this? @Hussain0520 was eager to help, but was redirected, perhaps it would be better to use his time?

gustaff-weldon avatar Dec 21 '23 15:12 gustaff-weldon

Hi @gustaff-weldon, thanks for your interest. For anyone interested in contributing a solution, please read https://github.com/hashicorp/terraform/blob/main/.github/CONTRIBUTING.md. If someone were to propose a solution, I could run that past the maintainers.

crw avatar Dec 21 '23 18:12 crw

This would be extremely helpful because the provider we are using has a lot of gaps that someone needs to go in afterwards and fix. Unfortunately this is out of our hands. If we could have some sort of way to print a message when we know there is an issue that terraform can't handle (because the provider can't handle it) that would be extremely helpful.

escherrer avatar Feb 02 '24 19:02 escherrer