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: README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,13 +163,13 @@ Please ensure that the `MarkdownDescription` field is set in the schema for each
163
163
To generate the documentation run either:
164
164
165
165
```sh
166
-
$ make docs
166
+
make docs
167
167
```
168
168
169
169
or...
170
170
171
171
```sh
172
-
$ go generate ./...
172
+
go generate ./...
173
173
```
174
174
175
175
### Templates
@@ -210,6 +210,16 @@ provider_installation {
210
210
}
211
211
```
212
212
213
+
## Developer: Using the `skip_on` struct field tag
214
+
215
+
The `skip_on` struct field tag is used to skip the external API call when only attributes that affect the internal state are modified, e.g. retry configuration. The `skip_on` struct field tag is used to skip the external API call when only attributes that affect the internal state are modified, e.g. retry configuration. The `skip_on` struct field tag is a comma-separated list of operations that must be met in order to skip the field.
216
+
217
+
The provider will compare the state with the plan, and check for changes. If the only fields to me modified are those with the `skip_on` struct field tag set to the supplied operation, e.g. `update`, the provider will skip the external API call.
218
+
219
+
The following operations are supported:
220
+
221
+
*`update` - Skip the external API call when the operation is an update.
222
+
213
223
## Credits
214
224
215
225
We wish to thank HashiCorp for the use of some MPLv2-licensed code from their open source project [terraform-provider-azurerm](https://github.com/hashicorp/terraform-provider-azurerm).
// CanSkipExternalRequest checks if the external request can be skipped based on the plan and state.
10
+
// Two of the same objects are supplied as parameters, together with the operation that is being performed.
11
+
// The function uses the `skip_on` struct tag to determine if the field should be skipped.
12
+
// The value of the `skip_on` tag is a comma-separated list of operations that mean that changes to this field value do not require an external request and are in state only.
13
+
// The function will return true if the external request can be skipped, false otherwise.
0 commit comments