Skip to content

Commit

Permalink
looker: required oauth_config in google_looker_instance (#12214) (#…
Browse files Browse the repository at this point in the history
…20196)

[upstream:4eb884bf855479aa799f47e2757d7161f331cb8b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Nov 5, 2024
1 parent 4623734 commit b528f87
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
3 changes: 3 additions & 0 deletions .changelog/12214.txt
Original file line number Diff line number Diff line change
@@ -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
```
40 changes: 20 additions & 20 deletions google/services/looker/resource_looker_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
30 changes: 15 additions & 15 deletions website/docs/r/looker_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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).


<a name="nested_oauth_config"></a>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.

- - -

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.

<a name="nested_oauth_config"></a>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.

<a name="nested_psc_config"></a>The `psc_config` block supports:

* `allowed_vpcs` -
Expand Down

0 comments on commit b528f87

Please sign in to comment.