You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ This document serves as a guide for contributors implementing new features and r
17
17
-[CRUD Function Signatures](#crud-function-signatures)
18
18
-[Accessing the API Client](#accessing-the-api-client)
19
19
-[Error Handling](#error-handling)
20
+
-[Import](#import)
20
21
-[State Migrations](#state-migrations)
21
22
-[Logging](#logging)
22
23
-[Testing](#testing)
@@ -342,6 +343,42 @@ if err := deleteResourceOn404AndSwallow304OtherwiseReturnError(err, d, "resource
342
343
}
343
344
```
344
345
346
+
### Import
347
+
348
+
Import is registered via the `Importer` field with a `StateContext` function. After import runs, Terraform **automatically calls `Read`** — so the import function's only job is to set enough state for `Read` to succeed. Do not duplicate `Read` logic in the import function.
349
+
350
+
For resources with a single-part ID, the default passthrough importer is often sufficient:
0 commit comments