diff --git a/.changelog/12214.txt b/.changelog/12214.txt new file mode 100644 index 00000000000..32976637d11 --- /dev/null +++ b/.changelog/12214.txt @@ -0,0 +1,3 @@ +```release-note:bug +looker: made `oauth_config` a required field in `google_looker_instance`, as creating this resource without that field always triggers an API error +``` \ No newline at end of file diff --git a/google/services/looker/resource_looker_instance.go b/google/services/looker/resource_looker_instance.go index 67d216f5fdf..b231de79312 100644 --- a/google/services/looker/resource_looker_instance.go +++ b/google/services/looker/resource_looker_instance.go @@ -63,6 +63,26 @@ func ResourceLookerInstance() *schema.Resource { ValidateFunc: verify.ValidateRegexp(`^[a-z][a-z0-9-]{0,61}[a-z0-9]$`), Description: `The ID of the instance or a fully qualified identifier for the instance.`, }, + "oauth_config": { + Type: schema.TypeList, + Required: true, + Description: `Looker Instance OAuth login settings.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "client_id": { + Type: schema.TypeString, + Required: true, + Description: `The client ID for the Oauth config.`, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Description: `The client secret for the Oauth config.`, + }, + }, + }, + }, "admin_settings": { Type: schema.TypeList, Optional: true, @@ -315,26 +335,6 @@ disrupt service.`, }, }, }, - "oauth_config": { - Type: schema.TypeList, - Optional: true, - Description: `Looker Instance OAuth login settings.`, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "client_id": { - Type: schema.TypeString, - Required: true, - Description: `The client ID for the Oauth config.`, - }, - "client_secret": { - Type: schema.TypeString, - Required: true, - Description: `The client secret for the Oauth config.`, - }, - }, - }, - }, "platform_edition": { Type: schema.TypeString, Optional: true, diff --git a/website/docs/r/looker_instance.html.markdown b/website/docs/r/looker_instance.html.markdown index c8c6c5aa365..f833a6e9c57 100644 --- a/website/docs/r/looker_instance.html.markdown +++ b/website/docs/r/looker_instance.html.markdown @@ -281,6 +281,21 @@ The following arguments are supported: (Required) The ID of the instance or a fully qualified identifier for the instance. +* `oauth_config` - + (Required) + Looker Instance OAuth login settings. + Structure is [documented below](#nested_oauth_config). + + +The `oauth_config` block supports: + +* `client_id` - + (Required) + The client ID for the Oauth config. + +* `client_secret` - + (Required) + The client secret for the Oauth config. - - - @@ -320,11 +335,6 @@ The following arguments are supported: disrupt service. Structure is [documented below](#nested_maintenance_window). -* `oauth_config` - - (Optional) - Looker Instance OAuth login settings. - Structure is [documented below](#nested_oauth_config). - * `platform_edition` - (Optional) Platform editions for a Looker instance. Each edition maps to a set of instance features, like its size. Must be one of these values: @@ -519,16 +529,6 @@ nested resources will return an error. Possible values: DEFAULT, FORCE (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `oauth_config` block supports: - -* `client_id` - - (Required) - The client ID for the Oauth config. - -* `client_secret` - - (Required) - The client secret for the Oauth config. - The `psc_config` block supports: * `allowed_vpcs` -