hashicorp / hashicorp/terraform-plugin-sdk
Well known error for "already exists"
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
It would be nice to have a well known error core expects from providers when a resource already exists so that it can output the required import syntax:
```go
type AlreadyExistsError struct {
ImportID string
}
```
etc...
This needs to be raised to core as core is what knows the import syntax and the appropriate naming of the resource itself.
Contributor guide
Research direction
Start by tracing how provider errors reach core and how core determines import syntax; the issue identifies those provider and core entry points but names no files or tests. Define the expected well-known already-exists error and its ImportID, then verify that core can produce the appropriate resource import syntax from it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100