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
Reference: #834
Updates the website documentation to use Go 1.18+ `any` instead of an empty interface (`interface{}`) as the latter can be confusing to those unfamiliar with Go.
Code updates within this Go module can be refactored at some other point, if necessary or desired.
@@ -200,7 +200,7 @@ The Terraform import framework supports importing multiple resources from a sing
200
200
Given our fictitious example resource, if the API supported many associations with it, we could perform an API lookup during the resource import function to find those associations and add them to the Terraform state during import.
201
201
202
202
```go
203
-
funcresourceExampleThingImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
203
+
funcresourceExampleThingImportState(d *schema.ResourceData, meta any) ([]*schema.ResourceData, error) {
204
204
// Perform API lookup using the import ID (d.Id()) and save those into a variable named associations
Copy file name to clipboardExpand all lines: website/docs/plugin/sdkv2/resources/retries-and-customizable-timeouts.mdx
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ The retry helper takes a timeout and a retry function.
81
81
In the context of a `CREATE` function, once the backend responds with the desired state, invoke the `READ` function. If `READ` errors, return that error wrapped with `resource.NonRetryableError`. Otherwise, return `nil` (no error) from the retry function.
@@ -120,7 +120,7 @@ func resourceExampleInstanceCreate(d *schema.ResourceData, meta interface{}) err
120
120
Use `resource.StateChangeConf` when your resource has multiple states to progress though, you require fine grained control of retry and delay timing, or you want to ensure a minimum number of occurrences of a target state is reached (this is very common when dealing with eventually consistent APIs, where a response can reply back with an old state between calls before becoming consistent).
0 commit comments