hashicorp / hashicorp/terraform-plugin-sdk
Ability for Terraform plugins to give status updates via stdout in CLI
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
### Current Terraform Version
```
v0.11.7
```
### Use-cases
Any Terraform provider may benefit from being able to log useful status updates to Terraform CLI users.
For example, the OCI provider has retry logic whenever it encounters HTTP errors from the service. This retry logic can run for at least 10 minutes and maybe hours if a user has configured a higher retry value.
Currently, we log retry attempts from the provider but they can only be seen by Terraform CLI user if they have TF_LOG=DEBUG setting.
Another example, is when creating resources that take a very long time to provision and may require some polling to wait for it to reach a final state.
Without the TF_LOG setting, the user doesn't have much visibility into why an `apply` command is taking so long and has the appearance that the command is hanging.
### Attempted Solutions
To see these status updates, the user must have TF_LOG=DEBUG but most users don't have this enabled by default.
### Proposal
There should be a way for providers to surface updates about a resource's progress w.r.t. the Create, Update, Read, Delete operations.
### References
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing how provider Create, Update, Read, and Delete operations communicate progress and how Terraform CLI currently handles provider logs; done means users can see provider status updates without setting TF_LOG=DEBUG.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100