hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io
Other
43.02k stars 9.57k forks source link

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

Open captainfalcon23 opened 2 years ago

captainfalcon23 commented 2 years ago

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

crw commented 2 years ago

Thanks for this feature request! If you are viewing this issue and would like to indicate your interest, please use the 👍 reaction on the issue description to upvote this issue. We also welcome additional use case descriptions. Thanks again!

Hussain0520 commented 2 years ago

Hi, I would like to contribute to this issue.

crw commented 2 years ago

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!

gustaff-weldon commented 11 months ago

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

crw commented 11 months ago

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.

escherrer commented 10 months ago

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.

ebmeierj commented 1 month ago

+1