@@ -54,6 +54,14 @@ type Resource struct {
5454 // organization variant, however most resources do not need it.
5555 ApiVariantPatterns []string `yaml:"api_variant_patterns,omitempty"`
5656
57+ // ApiResourceField indicates what field on the API resource is managed by a resource.
58+ // This is generally relevant for fine-grained resources. For example,
59+ // google_compute_router_nat manages the `nat` field on the `Router` resource. Can be
60+ // set to "." to indicate explicitly that the resource's fields aren't
61+ // "nested", even if the resource uses NestedQuery. This is useful for resources that
62+ // use "list" instead of "get" as the read endpoint.
63+ ApiResourceField string `yaml:"api_resource_field,omitempty"`
64+
5765 // [Required] A description of the resource that's surfaced in provider
5866 // documentation.
5967 Description string
@@ -323,11 +331,6 @@ type Resource struct {
323331 // The version name provided by the user through CI
324332 TargetVersionName string `yaml:"-"`
325333
326- // ApiResourceField indicates what field on the API resource is managed by a resource.
327- // This is generally relevant for fine-grained resources. For example,
328- // google_compute_router_nat manages the `nat` field on the `Router` resource.
329- ApiResourceField string `yaml:"api_resource_field,omitempty"`
330-
331334 ImportPath string `yaml:"-"`
332335 SourceYamlFile string `yaml:"-"`
333336
0 commit comments